The most obvious behavior changes, will probably be, that we try to report errors whenever you type and only run elm make when you save a file. Followed by that elm-analyse has been removed and replaced by our own linter.
2.0.0
Features
Enabled type checking diagnostics that update on document change. These include parsing errors, type mismatch errors, value not found errors, etc
Support file events APIs (Previously VSCode only)
On file create, the module name will be inserted
On file rename, the module name and all references will be updated
A new “extract function” code action. Select a complete expression and it can be extracted to a function in the top level or the enclosing let expression (if there is one)
A new “install package” code action. When you try to import a module that is not installed, a code action will offer to install it. (we only check your local elm cache for possible packages and there is a setting to control skipping confirmation)
Replaced elm-analyse with our own diagnostics, there might be missing rules for you due to this
Show inferred type information on hovers
Support linked editing ranges. When editing a function name, the type annotation name will auto rename, or vice versa (needs to be enabled in most clients)
Watch elm.json for changes. The server will restart when a change is detected
Run elm make on server init
Improve record completions
Ports now have codeLenses, can find references and have correct types on mouseover
Bug Fixes
Greatly improve performance of diagnostics and type inference
Fix some type inference cases
Fix module resolution to be more like how the compiler resolves modules
Fix some incorrect unused value diagnostics
Fix how errors from third party binaries are shown
Fixed test dependencies being available in non test modules
A question on the major version: Should people expect breaking changes in a way? Is the removal of elm-analyse the only possible breaking change? Or is it more of a major version because it reached a level of features/stability which you are happy with?
Thanks, upgraded and immediately got 78 problems in the current project - but they were from your linter so all good. (I hadn’t run elm-analyse after a big refactor).
Maybe I wasn’t set up correctly with 1.5.3, but I previously had to run elm-analyse from the terminal in vscode, whereas in 2.0.0 your linter picks up issues instantly with no config required which is great.
It’s just a big changelog and kind of a paradigm shift, as we run checks on typing now. So it’s type, see if we complain → move on. Previously you had to save after each change, to see errors. You will need to do that now too, but it should be far less and hopefully we can phase it out completly.
And yes, we choose not to migrate some of the elm-analyse rules for now.
We had to make elm-analyse opt in at one point, as it was too slow. Especially on bigger projects.
After upgrading, anyone having problems with Vim and Ale?
I am see parsing errors on Elm code that is correct. I will open a Github issue, unless there is something know about Vim/Ale – perhaps I got the setup wrong. Although I did try a clean Vim setup.