Skip to content

Releases: elixir-lsp/elixir-ls

Release v0.18.0

22 Dec 19:05
Compare
Choose a tag to compare

v0.18.0: 22 December 2023

Highlights

  • Elixir 1.16 support
  • Diagnostics provider now returns related info with code positions. This feature works best with elixir 1.16 allowing for navigation to invalid syntax elements like mismatched brackets
  • On type parser has been improved and extended. It now keeps a cache of parsed AST and extracted document metadata. Most of the providers has been updated to reuse this metadata eliminating the need for on demand parsing. This should make completions, hover, etc more snappy. The previous implementation was particularly not efficient for completions provider that would parse the file twice for each request
  • Phoenix integration improved. Go To Definition can now navigate to controllers when inside a Phoenix scope. Complete suggestions in Phoenix.Router now return controllers and actionsGustavo Aguiar

Improvements

  • Diagnostic provider returns deprecated and not used tags on certain warnings. This allows editors for visually marking code ranges using deprecated APIs and not used code constructs
  • Diagnostics are now stored along with document version. Diagnostic publishing algorithm has been improved to prefer recent parser diagnostics over stale build diagnostics.
  • Parser is now able to provide diagnostics in untitled: schema files based on languageId document property
  • On type formatting and Folding ranges providers are now disabled on eex documents as eex was never supported in those providers
  • OTP 26 compatibility warning on Windows updated to direct users to install 26.2+ version
  • Struct field completions now work on functions returning remote type sarah kate
  • Type inference from guard expressions added Nguyễn Văn Đức

Fixes

  • Fixed crash in document symbols provider on invalid attribute nodes
  • Fixed crash on cases where some compiler generates diagnostics with invalid position
  • Fixed test lense provider on code using Elixir proxy
  • Fixed debugger crash when stacktrace frame returns undefined instead of arguments list
  • Improved LSP compatibility on document synchronization. Previously the document version after applying changes was increased. This bug was present since the initial code release but started causing issues with discarded diagnostics in Helix editor since v0.17.0 started publishing diagnostics with document version
  • Fixed invalid result returned from build process when handling error during project reload

Potential incompatibilities

  • elixir_ls_debugger app has been renamed to debug_adapter to better reflect that it is not a debugger but an adapter implementing Debug Adapter Protocol. Similarly, the launch scripts has been renamed to debug_adapter.sh and debug_adapter.bat respectively. Editor extensions and custom launcher scripts may need an update

Release v0.17.10

19 Nov 22:27
Compare
Choose a tag to compare

v0.17.10: 19 November 2023

Improvements

  • Improved validation of language server configuration
  • Improved validation of debugger launch configuration
  • Diagnostics with no file are now emitted on mix.exs. Previously they were skipped
  • Debugger emits better error messages when launch configuration is invalid
  • Language server made more predictable on critical errors (e.g. project directory no longer existing)

Fixes

  • Fixed crash when callback from docs cannot be matched with callbacks from typespecs
  • Fixed invalid expansion of Enum.fetch in type inference engine
  • Handled a few cases of invalid unicode binaries
  • Fixed crash in debugger when stacktrace frame cannot be fetched
  • Increased timeout on variable evaluation
  • Fixed crash in debugger when inspecting an improper list
  • Fixed crash in debugger when reloading test modules and :code.delete/1 fails

Release v0.17.9

13 Nov 21:22
Compare
Choose a tag to compare

v0.17.9: 13 November 2023

Improvements

  • Capitalized map keys are no longes suggested in completions. Such keys result in invalid alias expression
  • Completions should be able to infer struct and map keys in more cases when variable is a result of function returning struct or map
  • ElixirLS will refuse to start if unable to create its files. This should limit the number of cases when server starts in faulty state

Fixes

  • Fixed crash in completions when attribute expands to atom not being an elixir module
  • Fixed crash in completions when map has capitalized atom keys
  • Fixed crash on invalid alias expressions
  • Fixed crash when suggestion a variable that is known to be a struct
  • Removed 5s timeout on writing debugger output. This led to crashes under heavy load
  • Fixed language server crash when diagnostic use IO.chardata file location

Release v0.17.8

09 Nov 19:21
Compare
Choose a tag to compare

v0.17.8: 9 November 2023

Improvements

  • Added compatibility warning on OTP 26 and Windows
  • Raise more filesystem related errors to user. The server will now refuse to start if it cannot create its files in .elixir_ls directory

Fixes

  • Fixed crash in completions when local function accidentally fuzzy matches sigil_ prefix
  • Workaround for elixir crash when fetching docs and cwd is nil
  • Fixed crash in completions with invalid struct module
  • Fixed crash in completions when __struct__ cannot be evaluated
  • Fixed crash in hover when inspecting not know metadata
  • Fixed crash in test code lense when describe block cannot be found
  • Fixed crash in debugger when process exits or continues during async variables retrieval
  • Fixed crash when publishing diagnostics and stacktrace entries does not specify file
  • Fixed crash in build when the server tries tu purge and recompile project and it is not currently loaded

Release v0.17.7

06 Nov 15:17
Compare
Choose a tag to compare

v0.17.7: 6 November 2023

Fixes

  • Fixed issue in formatter not being able to format files in non mix projects
  • Fixed language server crash when unable to suggest contracts
  • Fixed language server when handling delete file notification and tracer is not behaving correctly
  • Fixed crash in completions when defoverridable refers to delegated function
  • Fixed crash in type inference engine related to invalid handling of Map functions arguments
  • Fixed crash in completions when overridable function has non trivial parameters
  • Added missing clauses handling function call expansion in type inference engine

Release v0.17.6

02 Nov 18:30
Compare
Choose a tag to compare

v0.17.6: 2 November 2023

Improvements

  • Bring back partial support for elixir 1.12. Note that it's best effort and not all features will work
  • Directory issues with fish launch script fixed Jamin Thornsberry
  • RTX activation in launch script now uses env -s instead of activate Walton Hoops
  • Language server is now more resilient when cwd changes. Workaround added for elixir issue when Path.expand would unnecessarily evaluate File.cwd!
  • Tracer should now be able to recover when DETS files are corrupted
  • elixir_sense plugin crash is now handled and should not prevent completions

Fixes

  • Fixed crash in debugger when on_load fails during module interpreting
  • Fixed crash in completions due to missing regex escapes
  • Fixed crash in document symbols on invalid typespec
  • Fixed crash in test code lense when test block cannot be found
  • Launch script properly uses custom Mix.install. This error made it fail on elixir 1.16. Not e that elixir 1.16 is not yet supported
  • Fixed crash in type inference incorrectly matching on typespec with arguments
  • Fixed crash in completions when callbacks from typespecs do not match those from docs

Release v0.17.5

31 Oct 11:00
Compare
Choose a tag to compare

v0.17.5: 31 October 2023

Improvements

  • Invalid environment variables config is now raised as message. Previously it would crash the server
  • Compile tracer is more error tolerant. It should now handle invalid DETS files and missing directories
  • Dialyzer is more error tolerant - it should now be able to recover from broken beam files on elixir 1.14+

Fixes

  • Fixed crash when mix is unable to load deps. Loading of deps should now emit diagnostics
  • Fixed crash in complete when editing a map/struct
  • Fixed a crash in parser on untitled: schema files
  • Fixed a crash when emitting diagnostics and cwd is not present

Release v0.17.4

30 Oct 13:03
Compare
Choose a tag to compare

v0.17.4: 30 October 2023

Improvements

  • Dialyzer will now store beams in separate directories for each elixir/OTP combo. This should limit number of errors due to beam errors
  • Debugger will now use current directory if projectDir is not set. This makes it easier to setup in folderless configuration

Fixes

  • Fixed complete crash with non Unicode characters
  • Fixed hover crash with functions with no args
  • Fixed complete crash when one of the apps gets unloaded
  • Fixed complete crash when struct/map has non atom keys
  • Fixed complete crash on non keyword import options
  • Fixed crash when type was incorrectly recognized
  • Fixed hover crash due to system limit
  • Fixed fish shell init script to work with paths containing whitespace Julia
  • Document symbols handle some more cases of invalid AST
  • Language server is now more careful with current directory. It should make it more stable when project dir cannot be changed into
  • Various cases of current directory usage fixed. This should improve stability during build when cwd changes
  • All references to Mix.Project moved under a build lock or made go through cache. This should improve stability during build when Mix.Project stack changes
  • Fix error prone usages of String.starts_with? as a way of checking if file is in directory
  • Language server made more stable with autoBuild disabled

Release v0.17.3

24 Oct 21:17
Compare
Choose a tag to compare

v0.17.3: 24 October 2023

Fixes

  • Fixed crash when language server tried to respond to cancelled requests. The bug was longstanding but changes from v0.17.2 exposed it
  • Fixed crash in hover provider when markdown header cannot be formatted
  • Fixed language server crash when reloading due to configuration change. The bug was longstanding but changes from v0.17.2 exposed it
  • Fixed a crash when hovering over struct field access
  • Fixed a dot call inference crash affecting various providers
  • Workaround AST parsing crash affecting various providers

Release v0.17.2

23 Oct 14:42
Compare
Choose a tag to compare

v0.17.2: 23 October 2023

Improvements

  • Better rendering of functions with many arguments in hover
  • Document symbols correctly annotate ranges of last element in do-block
  • ElixirLS will emit LSP and DAP telemetry events that clients can subscribe to

Fixes

  • Fixed compilation error on modules using Application.compile_env. This problem was introduced in v0.17.0
  • Fixed a problem when old diagnostics would not be cleared after server restart