Skip to content

Releases: WhatsApp/erlang-language-platform

2024-09-10

10 Sep 14:12
Compare
Choose a tag to compare

Highlights

  • Always treat the version of a document opened in the IDE as the source of truth in the Erlang Service sidecar, avoid reading files directly from disk
  • Fix a hang in the IPC protocol under load (3307219)
  • Add diagnostics to avoid 'and' and 'or' operators W0025 (d15f10f)
  • Restore OTP 25 support (#41) (belltoy)
  • Allow a spec to include a module name, if it matches current module (188a632)
  • Solve unused record field false positive (fixes #51)

Full Changelog

397f97c Add resolution for outdated path-to-regexp package (Alan Zimmerman)
d14edcd Bump VS Code extension version to 0.29 (Alan Zimmerman)
94a2b4f BE do not use disk fixture for eqwalizer test (Alan Zimmerman)
8492dce BE: Remove salsa file_revision (Alan Zimmerman)
c9253c0 BE: do not use disk fixture for erlang service (Alan Zimmerman)
4fda1b8 BE: rename needs_erlang_service to needs_fixture_on_disk (Alan Zimmerman)
ad4451f Fix Github CI by marking failing test to require eqwalizer (Alan Zimmerman)
bb511c0 BE: Tidy up erlang_service_server match clauses (Alan Zimmerman)
e1eb3cd Fix typo in installation instructions (Roberto Aloi)
1fd9e32 6/n Always use ELP file contents in erlang_service (Alan Zimmerman)
86f2c0d 5/n Make OTP source available in elp parse-all (Alan Zimmerman)
4873369 4/n Pass file contents to erlang_service with parse request (Alan Zimmerman)
536c67f 3/n Add erlang_service callback reply status (Alan Zimmerman)
e721b15 2/n: pass the file_id back to ELP (Alan Zimmerman)
d9a772d 1/n: Tramp FileId into erlang_service compile, for merge (Alan Zimmerman)
188a632 Allow a spec to include a module name, if it matches current module (Alan Zimmerman)
5e1dd10 Report bad maps -- snapshot tests (Victor Lanvin)
87beaca Report bad map types (Victor Lanvin)
c96bfcb Get rid of option to approximate maps (always true) (Victor Lanvin)
4d86d45 Map "WeakWarning" severity to "Disabled" in arc (Roberto Aloi)
86be033 Resolve built-in ?MODULE macro when expanding atoms (Roberto Aloi)
9ceb0df Add testcase to showcase unused record field false positive (Roberto Aloi)
79c2299 Fix callback module for some errors (Roberto Aloi)
b2ff100 BE:Fix some eqwalizer warnings in the erlang service (Alan Zimmerman)
03ecec5 Improve buck target generation for umbrella targets (Alan Zimmerman)
e1c2294 Bump vulnerable dependencies (Roberto Aloi)
1c978a0 Bump vulnerable dependencies (Roberto Aloi)
3307219 Disable busy limits for the erlang service stdio port (Alan Zimmerman)
23ec0c8 Address elp eqwalize-all hanging (Alan Zimmerman)
c8aacf7 Add --prefix option to lint sub-command (Roberto Aloi)
5f6ade1 BE: Remove legacy erlang_service_server API call (Alan Zimmerman)
cda7d32 delayed resolution of union constraints (Ilya Klyuchnikov)
60a5ee4 more tests for unions in generics (Ilya Klyuchnikov)
5c00958 Add missing eqwalizer OTP version check in tests (Alan Zimmerman)
eeebe7b skip eqwalizer tests if OTP does not support eqwalizer (Alan Zimmerman)
93ab97f Disable eqwalizer for OTP < 26 (#48) (Alan Zimmerman)
93525f7 Add a comment for elp lint filtering (Alan Zimmerman)
61700b1 Add W0025 assist: make 'and' become ',' in guards (Alan Zimmerman)
595155a Track Guards in parents for fold (Alan Zimmerman)
367795f Put constructor option into fold parents field (Alan Zimmerman)
623b635 BE: Bring in a type alias for Guards in HIR (Alan Zimmerman)
b1c2397 Add parens assist for W0025 (Alan Zimmerman)
d15f10f Add diagnostics to avoid 'and' and 'or' operators (Alan Zimmerman)
ac03a66 BE: improve stripping of annotations (Alan Zimmerman)
dd4bb9d Custom type-checking for lists:partition (Victor Lanvin)
d86d6d7 Preprocess lists:partition (Victor Lanvin)
16eef67 Implement AST transformer (Victor Lanvin)
ed89ea0 Snapshot tests for lists:partition (Victor Lanvin)
1ae1007 Strip RUST_BACKTTRACE and RUST_LIB_BACKTRACE before invoking buck2 (Roberto Aloi)
ca3a117 Mark eqwalize_all_fails_on_bad_parse test as flaky (Roberto Aloi)
a9889fe Add full logging of eqWAlizer errors' context (Victor Lanvin)
23cc244 Rephrase Helix support (Roberto Aloi)
1e5d66d Document adding ELP support to Helix (#46) (offsetcyan)
f1ed157 Add instructions on how to request an invite for the Erlanger Slack (Roberto Aloi)
334bfd1 Add debug info to elp (Roberto Aloi)
31cb05e Bump axios to 1.7.4 (Roberto Aloi)
6d28deb Canonicalize all paths from rebar3 build info (Alan Zimmerman)
71c445b BE: upgrade deps in Cargo.toml (Alan Zimmerman)
0f93fc3 BE: cargo update to latest dependencies (Alan Zimmerman)
195cf1b BE: upgrade rust-analyzer dep from 2022-09-05 to 2024-07-29 (Alan Zimmerman)
8b8eb2e Restore OTP 25 support (#41) (belltoy)
2c30d29 Fix transitive check (Victor Lanvin)
bf00b02 erlang_service: remove cursor (Michał Muskała)
baad626 Remove eetf::Term based build info (Alan Zimmerman)
3b400e3 Remove ProjectData::build_info_path (Alan Zimmerman)
ff7a7af remove build info from eqwalizer call (Alan Zimmerman)
14a47c5 Add AnyArityFunType to subtyping and vars elimination (Victor Lanvin)
57e3b9d Bug with generic and function of any arity -- snapshot (Victor Lanvin)

2024-08-05

05 Aug 09:09
Compare
Choose a tag to compare

Highlights

  • Process OTP 27 Doc attributes
  • Newer version of EqWAlizer
  • Bug fixes and performance improvements (up to 20% for elp parse-all and elp eqwalize-all)

Full Changelog

5d3976d Bump OSS VS Code extension to 0.28.0 (Roberto Aloi)
e9bade8 18/n Better callback handling in erlang_service_server (Alan Zimmerman)
f36bb54 17/n make erlang_service Response an enum (Alan Zimmerman)
07b62a7 16/n Do not send extra Id in callback response to erlang_service (Alan Zimmerman)
365668d 15/n: standardize on request_reply_handle for ELP erlang_service (Alan Zimmerman)
79c36d6 14/n Improve erlang_service ELP callback architecture (Alan Zimmerman)
5dc186b 13/n use ELP include resolution for erlang_service parsing escripts too (Alan Zimmerman)
8e23199 12/n Remove erlang_service synthetic include file tracking (Alan Zimmerman)
79fa273 11/n cache include lookups in salsa (Alan Zimmerman)
85b1b4d 10/n Process file:path_open for docs (Alan Zimmerman)
451c54f 9/n Process file:path_open for include_lib (Alan Zimmerman)
b8eac95 7&8/n use include file resolution in erlang service (Alan Zimmerman)
96d066b 6/n Move IncludeCtx into base_db crate (Alan Zimmerman)
fac535a 5/n: split IncludeCtx (Alan Zimmerman)
c58e2a8 4/n erlang_service: deal with open response (Alan Zimmerman)
2cc7075 3/n Update request_parse architecture in ELP (Alan Zimmerman)
65b0fdc 2/n erlang_service: tramp request id through (Alan Zimmerman)
8c9f07e 1/n: erlang_service include resolution via ELP (Alan Zimmerman)
48dd4a3 Rewrite ElabGuard (Victor Lanvin)
64f30be Kill redundant guard detection (Victor Lanvin)
aba65bb Bug in disjunction in guard (Victor Lanvin)
e1d9ee3 Remove expr field from structured eqwalizer errors (Michał Muskała)
054596e OTP27 doc attribute processing (Alan Zimmerman)
61cd98f Clean up stray logging in erlang_service (Alan Zimmerman)
7d002a8 add overloaded specs to eqwalizer stats (Ilya Klyuchnikov)
1cdaa26 prepare for more eqwalizer stats (Ilya Klyuchnikov)
1e991c9 IPC: do not send unneeded forms to eqWAlizer (Ilya Klyuchnikov)
ae67e55 ELP: InternalForm is not used (Ilya Klyuchnikov)
3358c3d Add ref:main in GH workflow for pulling eqWAlizer (Victor Lanvin)
4bdc56f Swap props to negate tests (Victor Lanvin)
fce8776 Bug in occurrence typing -- snapshot (Victor Lanvin)
f7ec819 Upgrade to time-0.3.36 (Alan Zimmerman)
2b883c4 Merge eqWAlizer tests (Victor Lanvin)
aaafd01 hover for OTP27 (Alan Zimmerman)
b531363 Do not report an error for doc attributes file invalid in erlang module (Alan Zimmerman)
5885bbd intermediate stubs are not sent (Ilya Klyuchnikov)
23417bc Remove testing functions (Victor Lanvin)
180d30d erlang service: remove spurious trap_exit call (Michał Muskała)
5431929 Remove strict mode (Victor Lanvin)
0fcff8e only gradual mode (Ilya Klyuchnikov)
b207c70 Simplify LSP main loop task processing so slow_event telemetry is accurate (Alan Zimmerman)
ebbfc67 Improve typing of maps:map when the input is a shape (Rui Gonçalves)
db757df Apply elp:ignore to erlang_service diagnostics too (Alan Zimmerman)
33dca0e Test using bxl for project config (Alan Zimmerman)
f807c30 BE: Swap two tests around (Alan Zimmerman)
2cda1c3 Do not report W0012 for header files (Alan Zimmerman)
a168778 Improve expected_type when returning an atom (Alan Zimmerman)
3791250 Dedup keys when parsing shape maps in ELP (Rui Gonçalves)
dac7b06 Use raw port for stdin/out in erlang service (Michał Muskała)
5666ee2 Simplify Eralng service (Michał Muskała)
4d95be1 elp lint: automatically request erlang serivice diagnostics if needed (Alan Zimmerman)
aae051d BE: clear warning from new rust version (Alan Zimmerman)

2024-07-16

16 Jul 08:20
Compare
Choose a tag to compare

Highlights

OTP 27 support

The internal copy of the erlc frontend now uses maybe, so it means we must remove OTP 25 build versions

eqWAlizer will now report uncovered function clauses

eqWAlizer will now report uncovered clauses, which means eqWAlizer is detecting that the corresponding pattern and guards cannot match the input type, and will not fully type-check it. In most cases, it means a spec or a type alias has to be updated. In some rarer cases, a clause may simply be dead code and can be deleted.

Improved diagnostics reported ranges

Various diagnostics that reported on a function call now report the range of the module:function part not the full MFA.

undefined function (W0017) diagnostic now reports for the erlang module too

Missing compile warn_missing_spec_all (W0012) diagnostic rework

We have a diagnostic to report that there is not a -compile(warn_missing_spec_all). directive for a file.
It is disabled by default. To enable it, add a .elp_lint.toml file to your project root, with contents

enabled_lints =['W0012']

This is now automatically read and used by ELP in language server mode, if it exists, and reloaded if it changes.

It can also have a disabled_lints section.

elp lint --one-shot CLI argument

If a given diagnostic code applies to a file, apply a fix for all occurrences if asked.
It normally only does one at a time, so the command needs to be called multiple times.
This will be made more logical in future, removing the need for this flag.

Raw Change Log

2aed828 Turn on vscode publishing for OTP 26.2 (Alan Zimmerman)
cd5e3b6 tests: OTP-27 compatible (Ilya Klyuchnikov)
ffad3c7 Bump vscode extension version for imminent release (Alan Zimmerman)
6ecc191 CI: remove OTP 25 from the matrix (#38) (Alan Zimmerman)
8462fa6 bump version to 0.7.0 (Alan Zimmerman)
6de370c Protect against panics from DidChangeTextDocument (Alan Zimmerman)
e055181 BE: fix currently unused enum variant warning (Alan Zimmerman)
eb10270 BE: Improve reported range in slow functions diagnostic (Alan Zimmerman)
e0e969e Add UseRange to DiagnosticTemplate (Alan Zimmerman)
00418bc BE: Improve reported range for cross_node_eval (Alan Zimmerman)
f8398ba Fix CallTarget.range for auto-erlang remote call (Alan Zimmerman)
57da3b2 BE: Improve reported range for undefined_function diagnostic (Alan Zimmerman)
a6e35f4 BE: supply range without args to find_cal_in_function callback (Alan Zimmerman)
05ae919 Fix buck project model to prevent false positive undefined function (Alan Zimmerman)
2e532f3 BE: Improve Target.private_header documentation (Alan Zimmerman)
8a316b3 report undefined function for erlang functions too (Alan Zimmerman)
4b9183f rename elp lint '--enable-erlang-service-diagnostics' to '--enable-erlc-diagnostics' (Alan Zimmerman)
c03acbd Add --include-otp-diagnostics option to "elp lint" (Alan Zimmerman)
1495d56 3/n: ReplaceInSpec assist: fix match (Alan Zimmerman)
a134c3e 2/n: ReplaceInSpec assist: detect match (Alan Zimmerman)
6622118 Ad-hoc handling of is_float/is_integer guards (Victor Lanvin)
fae41b5 Snapshot uncovered clause FP with numbers (Victor Lanvin)
ccaf672 1/n: ReplaceInSpec assist: initial infra and serialization (Alan Zimmerman)
ce6aac6 Fix typo in function name (Roberto Aloi)
f4bdf05 Add ability to pass custom prefix to glean sub-command (Roberto Aloi)
83c3c7c Update documentation links to reflect new format (Roberto Aloi)
773b00a Better erlang_service protocol (Michał Muskała)
ce0b616 Remove obsolete version of the scanner (Roberto Aloi)
109fe14 BE: Improve MFA Serde serialization (Alan Zimmerman)
9cffefc ensure elp:fixme takes effect on whole-file diagnostics (Alan Zimmerman)
914adfc add ignore and fixme assists to W0012 compile warn missing spec all (Alan Zimmerman)
fedc591 BE: use Expect for expected fix test results (Alan Zimmerman)
81c617b Fix offset calculation for sigils (Roberto Aloi)
ceef61e BE: Set lints_from_config while configuring lints (Alan Zimmerman)
efbd231 BE: rename DiagnosticConditions::explicit_enable to default_disabled (Alan Zimmerman)
b45363b Include event start time in telemetry (Alan Zimmerman)
db2cdef BE: remove disabling DiagnosticCode::MissingCompileWarnMissingSpec in tests (Alan Zimmerman)
ac9103b BE: Improve DiagnosticConfig initialization (Alan Zimmerman)
02bb478 reload LintConfig on config change (Alan Zimmerman)
e8ff008 server: always read .elp_lint.toml (Alan Zimmerman)
b13c59b elp lint: add test for lints explicitly enabled in config (Alan Zimmerman)
b952c15 switch fully to DiagnosticDescriptor for compile_warn_missing_spec diagnostic (Alan Zimmerman)
e0d2941 require compile_warn_missing_spec_all (Alan Zimmerman)
0d8f7cf Explictly filter explicitly enabled diagnostics (Alan Zimmerman)
3c3a5f5 BE: clarify include_otp flag when requesting diagnostics (Alan Zimmerman)
1195042 Add DiagnosticConditions.explicit_enable (Alan Zimmerman)
d041949 Snapshot: keep entire LintConfig, not just LintsFromConfig (Alan Zimmerman)
55e7d04 Move calculation of enabled diagnostics from config into ide crate (Alan Zimmerman)
881b659 Fix up typos (Ayoub Mansar)
80cadd3 Fix dependabot alert for vscode client (Alan Zimmerman)
3b84b94 add --one-shot to elp lint to apply all fixes at once (Alan Zimmerman)
c91b944 Shallow Dialyzer support on CLI (Tom Davies)
0fe3033 Handle sigil prefix/suffix in the scanner (Roberto Aloi)
50ba583 Update HIR for more-than-triple quote strings (Alan Zimmerman)
f8b673e Extend external scanner for triple quoted sigil strings (Alan Zimmerman)
1d7994a Add external scanner for triple quoted strings (Alan Zimmerman)
ba6e272 rename String::TripleQuoted to String::Verbatim (Alan Zimmerman)
6392db3 Update HIR for doc attribute (Alan Zimmerman)
f2be41c Update HIR for moduledoc attribute (Alan Zimmerman)
5968f13 6/n Update HIR for string sigils: term (Alan Zimmerman)
f3b2402 5/n update HIR for string sigils: type_expr (Alan Zimmerman)
60f7eb5 4/n Update HIR for string sigils: pat (Alan Zimmerman)
678752a 3/n Update HIR for string sigils: generalize lower_str_or_sigil (Alan Zimmerman)
e5fbb1a 2/n Update HIR for string sigils: expr (Alan Zimmerman)
1c24e7a 1/n Update HIR for string sigils (Alan Zimmerman)
e199f75 update grammar for string sigils (Alan Zimmerman)
eece0cc Update HIR to explicitly represent triple quoted strings (Alan Zimmerman)
ec0af1c Update grammar for triple quoted strings (Alan Zimmerman)
c9f1e31 Fix matching in scanner for triple quoted string continuation (Roberto Aloi)
e76a54a Update third-party grammar (Roberto Aloi)
fb463fe Fix use of maybe in macro argument (Roberto Aloi)
287c390 compiler: implementation of EEP-59 (Roberto Aloi)
5465e15 Implement warning for adjacent string literals without intervening white space (Roberto Aloi)
3625595 Preprocessor: Fail compilation for unknown functions (Roberto Aloi)
2e4fe37 Shorten code by list comprehension (Roberto Aloi)
aa86a80 Emit warning for triple quote chars (Roberto Aloi)
8c14904 Rename erl_scan_otp27 into elp_scan (Roberto Aloi)
2d67e73 Update scanner to always count of carriage return as zero (Roberto Aloi)
9541cb9 Export location type (Roberto Aloi)
f156ab6 Always consider maybe and else as keywords (Roberto Aloi)
599cf89 Modify erl_scan to use bytes (Roberto Aloi)
3e45eec Remove unnecessary has_fun (Roberto Aloi)
c2577d4 Remove ssa checks (Roberto Aloi)
48f021e Remove unused code (Roberto Aloi)
6b9ebca Format erl_scan (Roberto Aloi)
5495e9e Import latest erl_scan from OTP 27, strip away docs (Roberto Aloi)
d82f86f Error index entry for L1318 (Roberto Aloi)
8402121 New error codes for erl_lint/elp_lint (Roberto Aloi)
726ca97 Restore --force-warn-missing-spec-all flag (Roberto Aloi)
95b4ccb Upgrade elp_lint to latest available version (Roberto Aloi)
90398cb Implementation of EEP-59 Documentation Attributes (Roberto Aloi)
9b72b05 Remove trailing dot from erl_parse error messages (Roberto Aloi)
e2bac67 Fix bugs and distinguish between Sigil Type and Sigil Prefix (Roberto Aloi)
04d346e Remove ~r and fancy delimiters (Roberto Aloi)
aa99f88 Implement string sigils according to EEP 66 (Roberto Aloi)
37410c3 Remove unused argument (Roberto Aloi)
2b6dc11 Upgrade braces and ws dependencies (Roberto Aloi)
a303f92 CI: fix macOS x86_64 builds for eqWAlizer (#34) (Ali Sabil)
f7a3a14 Provide test example of using lints from config (Alan Zimmerman)
c2206f4 Add link to Slack channel in issue template (Roberto Aloi)
26960de Add telemetry for too-slow events (Alan Zimmerman)
a043fdc Add ELP installation instructions for Vim (Roberto Aloi)
9326281 Suggest elp shell when running eqwalize-all (Victor Lanvin)
bab39dc Make erlang service scoped per project and auto-started (Michał Muskała)

2024-06-07

07 Jun 13:48
Compare
Choose a tag to compare

Highlights

Fuzzy go-to-definition for functions

One of the challenges of a language server is to provide good ergonomics while working with partially correct code. Until now, go-to-definition would only work if the arity of the invoked function was exactly the same as the number of arguments passed in the invocation. We are now relaxing that constraint so that, if no definitions are found with an exact match (function name + arity) we fall back to a function with the same name but different arity. Handy if you are in the process of authoring code.

Support for Linux ARM64

Thanks to @asabil we now have a CI for Linux ARM64. Try the produced artifacts and let us know in case of issues!

No more "Background parsing" progress bar

The "Background Parsing" (separate from the "Loading Applications" one) spinner was displayed while the language server was populating its own internal cache. Many users interpreted this as part of the initial indexing process, so they were waiting for it to complete before using language features. This was not necessary - the background parsing is just an internal optimization -, so we are now hiding it from the user.

Bug fixes and improvements

  • New version of eqwalizer!
  • Fix crash in the elp shell that could happen during large rebases

Full ChangeLog

dd91c9a Bump extension (Roberto Aloi)
25154e0 Gracefully fail sending progress end (Michał Muskała)
ed3077e CI: add linux aarch64 build (#33) (Ali Sabil)
5754c77 Disable smart elaboration of negation in guards (Victor Lanvin)
42deec4 Repro -- invalid occurrence typing with negation of atoms (Victor Lanvin)
106b771 Sync file change logic from server to shell (Victor Lanvin)
687608f BE: Normalise types during lowering (Alan Zimmerman)
0968593 Only set eqWAlizer config if it has been changed (Victor Lanvin)
8fe7311 Avoid code duplication (Roberto Aloi)
6979267 Limit fuzzy search to go-to-definition (Roberto Aloi)
ff59c24 Fuzzy (any arity) go-to-definition for functions (Roberto Aloi)
3160b7a Add --clause-coverage option (Victor Lanvin)
e980308 EqwalizerConfig as Salsa input (Victor Lanvin)
f779dce Use correct name for [build_info] section (Roberto Aloi)
c37ed3b Remove "Background parsing" spinner (Alan Zimmerman)
8c47bb1 Reload project on change for ELP shell (Victor Lanvin)

2024-05-24

24 May 15:52
Compare
Choose a tag to compare

Highlights

✅ Completion and Hover information for built-in and imported functions.

We now correctly provide completions and signature help for BIFs and imported functions.

Screenshot 2024-05-28 at 18 29 56 Screenshot 2024-05-30 at 09 44 45

Fixes #28 , #29 .

📙 Documentation for NeoVim Support

Learn how to configure ELP in NeoVim here.

Thanks @mkuratczyk for the contribution!

✈️ Better navigation for Common Test suites

Screenshot 2024-05-30 at 09 55 03

It is now possible to navigate from a test-case name in the all/0 and groups/0 functions to its definition. It is also possible to quickly find the respective init_per_testcase/2, end_per_testcase/2 and the alike for a given test using the find references mechanism. Finally, renaming a test will also take care of updating all occurrences of the same test in a suite.

Full ChangeLog

f69546a Bump vscode extension version for imminent release (Alan Zimmerman)
0cf2364 completions for BIFs (Alan Zimmerman)
f413567 include module in DefMap::get_functions_in_scope (Alan Zimmerman)
025af9f lower imported functions and BIFs as remote calls (Alan Zimmerman)
7c2cae5 E2E test for as-you-type diagnostics (Roberto Aloi)
0ef4c22 Neovim support (#31) (Michal Kuratczyk)
f061fb5 Update meet for dynamic case (Victor Lanvin)
c270dac Implement go-to-def for CT testcases (Roberto Aloi)
4e17470 Add .globalcache to .gitignore (Alan Zimmerman)
e776a1c E2E test for unused macro (Roberto Aloi)
0772d13 E2E tests for extracting a function (Roberto Aloi)
4de26b7 E2E test for add edoc comment (Roberto Aloi)
efa8fca E2E test for types on hover (Roberto Aloi)
54d9b07 E2E test for compiler diagnostics (Roberto Aloi)
98b5ad1 use buck bxl query if asked (Alan Zimmerman)
7a3fd15 Use generic buck target cell names in tests (Alan Zimmerman)
e7a2948 Improve error reporting for 'elp project-info' (Alan Zimmerman)
5d6b729 Fix test failure (Alan Zimmerman)
a490e05 add buck bxl test (Alan Zimmerman)

2024-05-17

17 May 12:18
Compare
Choose a tag to compare

Highlights

⚙️ Easier configuration for custom projects

So far, it was only possible to use ELP with buck2 or rebar3 projects (via a plugin). An option to provide a custom build_info.json file was already available, but cumbersome for the user since it required creating and maintaining a large JSON file which listed all projects applications and dependencies.

You can now specify the structure of your project via a dedicated [build_info] section in the ELP config file. For example:

[build_info]
apps = "apps/*"
deps = "deps/*"

We hope this will make it easier to try ELP!

🎯 Precise ranges for undefined functions

We used to report a diagnostic for the whole -export attribute in case of an undefined function. We now restrict the range to the actual culprit.

Before:

Screenshot 2024-05-17 at 14 07 53

After:

Screenshot 2024-05-17 at 14 09 05

🐞 Bug Fixes

  • Fix a bug which caused the language server to report spurious diagnostics after switching branches
  • Do not try to compute code lenses for .config and .app.src files
  • Do not report syntax errors when the maybe (?=) operator is used
  • Avoid panic while calculating project-wide eqwalizer diagnostics due to 0 chunk size
  • Report correct ranges for diagnostics in presence of CRLF line endings
  • Fix handling of -file attributes
  • Fix detection of generated pragma in module preamble (fixes #24)

Full Changelog

ca7d3ab Bump version to 0.24.0 (Roberto Aloi)
e755c76 Add a test project for elp bxl query (Alan Zimmerman)
2bb78a7 Fix build by commenting out meta_only line (Alan Zimmerman)
50a2f7c Add config option to select buck project model query (Alan Zimmerman)
77d5d98 Include raw buck query result in elp project-info (Alan Zimmerman)
42b1f68 Temporarily ignore some files for CI 'elp parse-elp' (Alan Zimmerman)
e984d23 Handle -file attribute in .erl files (Roberto Aloi)
2957db5 Introduce build_info section in ELP config file (Roberto Aloi)
cbbec20 Generate dynamically build_info file (Roberto Aloi)
1f39bbc Add glob crate (Roberto Aloi)
64bd24a Bump tree-sitter-erlang version to 0.6.0 (for OSS) (Alan Zimmerman)
8efc68c Disarm unused trait method warning (Alan Zimmerman)
cc60e18 regen eqwalizer snapshot test (Ilya Klyuchnikov)
e2f6fbd Bump version to 0.6.0 (Alan Zimmerman)
113f969 Fix detection of generated pragma when 2001 is not a char boundary (Roberto Aloi)
0b99dae Add testcase for sigils (Roberto Aloi)
d197467 Add testcase for docstrings (Roberto Aloi)
18c7026 Bump tree-sitter crate to 0.22.5 (Alan Zimmerman)
fcdd3c1 Bump tree-sitter-cli to 0.22.5 (Alan Zimmerman)
e516a37 more precise handling of maps:remove (Ilya Klyuchnikov)
20130c8 BE: fix flaky test (Alan Zimmerman)
17cc6c7 Uncovered clause detection (Victor Lanvin)
d5627c5 Do not warn about usages of binary_to_term (Roberto Aloi)
99ebfe9 combine related errors for eqwalizer cli reporting too (Alan Zimmerman)
27769e0 Import epp_dodger from OTP 27 in Erlang Service (Roberto Aloi)
a07c9a4 Fix branch change diagnostic problem (Alan Zimmerman)
bb9612f Restrict L1227 (undefined function) diagnostics range (Roberto Aloi)
4f3b9eb Add test case showing the range for L1227 (undefined function) diagnostics (Roberto Aloi)
ee4b03d Do not panic if provided list of files is empty (Roberto Aloi)
fbd43eb Only generate lenses for elp-supported files (Alan Zimmerman)
bbd75be Add support for on-call links (Roberto Aloi)
ecb40d7 Add meta-only doc links (Roberto Aloi)
ee84c5b BE: make cross_node_eval config completely static (Alan Zimmerman)
076deb2 BE: make atoms_exhaustion config completely static (Alan Zimmerman)
bf8e8bf BE: make application_env BAD_MATCH completely static (Alan Zimmerman)

2024-04-29

29 Apr 08:32
Compare
Choose a tag to compare

The main visible improvements are

  • Do not crash when changing branches on project
  • Put full set of configuration options into the VS Code client, using Erlang Language Platform as the extension name
  • Properly deal with files having CRLF line endings

Detail

320ff4b CI: Update ci.yml for latest changes in github (#25) (Alan Zimmerman)
a0751fb Add infrastructure to cross node eval for custom error message per match (Alan Zimmerman)
8d5a1f6 Bump VS Code extension version to 0.23 for imminent release (Alan Zimmerman)
41b95be Introduce meta-only doc links (Roberto Aloi)
a387109 Prepare doc_links to handle multiple sources (Roberto Aloi)
18e0b2a Update erlang_service to process CRLF the same as ELP (Alan Zimmerman)
a937386 Capture LineEnding in LoadResult (Alan Zimmerman)
3125746 BE: use the same processing path converting from vfs to salsa (Alan Zimmerman)
bfff8ce Transparently calculate ProjectId from FileId in Type API (Roberto Aloi)
3c61178 dynamic() -> eqwalizer:dynamic() in tests (Victor Lanvin)
3ce7f9b Avoid project-wide diagnostics disappear upon closing (Roberto Aloi)
50f5a7f sort out panic for get_file_contents on a created file (Alan Zimmerman)
e4bac91 Bump version to 0.22 for imminent release (Alan Zimmerman)
331072a Update VS Code configuration options (Alan Zimmerman)
0926a13 Simplify filtering mechanism for EDoc and CT Diagnostics (Roberto Aloi)
11c54f3 Move include_otp to DiagnosticsConfig (Roberto Aloi)
45759fd Make OTP diagnostics configurable (Roberto Aloi)
28a3fcd Do not report OTP diagnostics by default (Roberto Aloi)
c97d4ab Fix subtyping dict < shape being too lenient (Victor Lanvin)
06e2065 Issue refining unions of maps (Victor Lanvin)
3e23e8c Fix W0017 documentation (Alan Zimmerman)

2024-04-17

17 Apr 13:58
Compare
Choose a tag to compare

b92293b specify escript path from cli (Roman Perehonchuk)
0d5865c specify erl path from cli (Roman Perehonchuk)
80bdc5b Bump extension version to 0.21.0 for imminent release (Alan Zimmerman)
ab022db Move unsafe integer conversion to dedicated linter (Roberto Aloi)
24092d9 BE: Enable eqwalizer types when using elp lint (Alan Zimmerman)
bc169cf Add for_each_function helper to sema (Roberto Aloi)
d809f50 Make target range extraction more discoverable (Roberto Aloi)
3529e62 Add string as known name (Roberto Aloi)
ae06332 ExportBuilder: put new export_type form after function exports (Alan Zimmerman)
fbb930b BE: use Expect for check fix tests (Alan Zimmerman)
67aa65d index per file (Roman Perehonchuk)
54ffca4 add code comments (Roman Perehonchuk)
0980351 eqwalizer assist for non exported type (Alan Zimmerman)
873deed export_type assist (Alan Zimmerman)
342a1e5 Generalise ExportBuilder to work on type exports too (Alan Zimmerman)
2f26898 fix build by inserting missing shipit tag (Alan Zimmerman)
9c1a002 output fully valid json for elp config command (Alan Zimmerman)
55b7e47 Add elp config command to dump all possible config options (Alan Zimmerman)
ca8b2a2 Add --include-suppressed flag (Roberto Aloi)
a925676 Enable inlay hints and signature help by default (Roberto Aloi)
2daeff8 use add_wip assist (Alan Zimmerman)
110ce5f Improve text fixture annotation removal regexp (Alan Zimmerman)
ca1a9b4 elp lint: bringing in code action fixes (Alan Zimmerman)
e7253ca track context diagnostic for assist (Alan Zimmerman)
efe7e59 Add request for task id to user input data (Alan Zimmerman)
3581077 add prompt field to user input (Alan Zimmerman)
6f4d773 add_fixme assist (Alan Zimmerman)
472b1a2 Allow setting group label in assist builder (Alan Zimmerman)
499c5fa Add UserInput String type (Alan Zimmerman)
d4e0774 Improve AssistContextDiagnosticCode (Alan Zimmerman)
825b4ec fact per file (Roman Perehonchuk)
aa0b3ac Add with_severity method (Roberto Aloi)
4e230e7 doc declaration for types (Roman Perehonchuk)
f3ae74c doc declarations for records (Roman Perehonchuk)
96b5118 doc declarations for macro (Roman Perehonchuk)
6c47f0b Remove test module uniqueness checker (Alan Zimmerman)
e6578f0 Remove ignore pragmas from type-based tests (Alan Zimmerman)
7a06306 Only create the eqwalizer exe once (Alan Zimmerman)
ccead8f doc declarations for vars (Roman Perehonchuk)
f4c2b62 doc declaration for functions (Roman Perehonchuk)
38282e4 backport v2 features to v1 (Roman Perehonchuk)
13012bf add header declarations (Roman Perehonchuk)
4e92ec9 Fix Erlang Service crash on ms_transform error (Roberto Aloi)
25a5ce8 Add E2E Test to verify no syntax errors for CAFs (Roberto Aloi)
a173ce0 Remove redundant check in atoms exhaustion linter (Roberto Aloi)
46f2e7f migrate erlint wids_everywhere diagnostic to ELP (Alan Zimmerman)
05a1390 add Diagnostic.with_fixme_fix (Alan Zimmerman)
dea0f3a xrefs only for files we indexed (Roman Perehonchuk)
015c6d7 xrefs only for files we indexed for v2 facts (Roman Perehonchuk)
ff9d544 don't serialize none (Roman Perehonchuk)
6bd3230 schema renames (Roman Perehonchuk)
661ec8d migrate xref v2 to key (Roman Perehonchuk)
feb2493 migrate declaration v2 to key (Roman Perehonchuk)
5ffc7f3 migrage xref fact to key (Roman Perehonchuk)
a624bc6 migrate declaration fact to key (Roman Perehonchuk)
d61008d migrate file lines fact to key (Roman Perehonchuk)
8281404 add keys to every predicate (Roman Perehonchuk)
c544d0c pretty print (Roman Perehonchuk)
8b48cfd macro expansion (Roman Perehonchuk)
39715cc use eqwalizer types only for vars (Roman Perehonchuk)
42ee297 clean-up (Roman Perehonchuk)
d9df2e0 utilize eqwalizer types and introduce var declaration (Roman Perehonchuk)
71ce3bc prepare testing infra to run with eqwalizer enabled (Roman Perehonchuk)
d88fbb0 add ods url to macro target (Roman Perehonchuk)
596143d refactor ods links (Roman Perehonchuk)
d521cda xref types (Roman Perehonchuk)
45edaff xref record in types (Roman Perehonchuk)
92bdff9 xref record index in patterns (Roman Perehonchuk)
c97175c xref record in patterns (Roman Perehonchuk)
ace1da8 xref record update (Roman Perehonchuk)
666a49a xref record field (Roman Perehonchuk)
0d177c3 xref record index (Roman Perehonchuk)
a7dcc43 xref for records (Roman Perehonchuk)
e07190b xref headers in include attributes (Roman Perehonchuk)
0baea06 move callback to separate function (Roman Perehonchuk)
65f358f xref functions in deprecated attribute (Roman Perehonchuk)
8bd2f32 xref functions in export statement (Roman Perehonchuk)
ac2419e xref macro in term (Roman Perehonchuk)
374d1ce xref macro in type (Roman Perehonchuk)
6fd1f7b xref macro in pat (Roman Perehonchuk)
14984e2 xref macro calls (Roman Perehonchuk)
d68a694 add captured function test v2 schema (Roman Perehonchuk)
152f4d8 add function xrefs to v2 schema (Roman Perehonchuk)
a9ea8c7 add record declaration to v2 schema (Roman Perehonchuk)
a43040f add type declaration to v2 schema (Roman Perehonchuk)
807c296 add macro declarations (Roman Perehonchuk)
b043285 add spec string to function declaration (Roman Perehonchuk)
b621018 add functions to new declaration facts (Roman Perehonchuk)
8fd0e13 prepare for v2 schema (Roman Perehonchuk)
febffe9 process glean in parallel (Roman Perehonchuk)
5d56af7 preparation step to paralelization (Roman Perehonchuk)
5df9c24 move declaration test to new test infra (Roman Perehonchuk)
bd149d2 move file fact and line facts to new test infra (Roman Perehonchuk)
4104e1b range for record update (Roman Perehonchuk)
cd1b363 range for record index (Roman Perehonchuk)
bda834c range for record fields (Roman Perehonchuk)
2049843 range for record expr (Roman Perehonchuk)
44a6bc2 range for functions without the args (Roman Perehonchuk)
72adf7c extract body_with_expr_source for future use (Roman Perehonchuk)
90dcd7b rewrite glean xref tests (Roman Perehonchuk)
d79711a refactor indexer to incorporate better test infra part2 (Roman Perehonchuk)
311fd8a refactor indexer to incorporate better test infra part1 (Roman Perehonchuk)
e0c7923 Go To Type Definition (Roberto Aloi)
261ca49 Add Body::range_for_any() function (Alan Zimmerman)
bb97a02 diagnostic descriptor for meta_only #1 (Alan Zimmerman)
e3c1add diagnostic descriptor: redundant_assignment (Alan Zimmerman)
dbb6602 diagnostic descriptor: trivial_match (Alan Zimmerman)
81cd23c diagnostic descriptor: unused_function_args (Alan Zimmerman)
2da4677 diagnostic descriptor: unused_macro (Alan Zimmerman)
f6e3e63 diagnostic descriptor: unused_record_field (Alan Zimmerman)
01ca341 diagnostic descriptor: mutable_variable (Alan Zimmerman)
1d33caa diagnostic descriptor: effect_free_statement (Alan Zimmerman)
e3e53e1 diagnostic descriptor: expression_can_be_simplified (Alan Zimmerman)
9338b0f diagnostic descriptor: application_env (Alan Zimmerman)
7720d85 disgnostic descriptor: missing_compile_warn_missing_spec (Alan Zimmerman)
e2403d2 diagnostic descriptor: slow_functions (Alan Zimmerman)
ace5919 diagnostic descriptor for dependent_header (Alan Zimmerman)
3a9850a diagnostics descriptor deprecated_function (Alan Zimmerman)
c2b0f64 diagnostic descriptor undefined_function (Alan Zimmerman)
74b20ec diagnostics descriptor for head_mismatch_semantic (Alan Zimmerman)
be8075f diagnostics descriptor for missing_separator (Alan Zimmerman)
2be92e3 Fix build. Missing colon in shipit comment (Alan Zimmerman)
120016a diagnostics descriptor for atoms_exhaustion (Alan Zimmerman)
78c6dea Introduce a diagnostic descriptor, to manage when they should run (Alan Zimmerman)
27952dd Add page for W0024 slow functions (Alan Zimmerman)
2ab3c5e Migrate slow functions diagnostic (Alan Zimmerman)
2060ade Diagnostics: Add helper to declaratively generate a diagnostic if a function is used (Alan Zimmerman)
4d9df03 Do not compute project-wide eqwalizer diagnostics until the first pass is completed (Roberto Aloi)
8ca7cdf Simplify caching logic (Roberto Aloi)
d6d1268 Add eqwalizer_caller test project (Roberto Aloi)
8779ff2 Upgrade Erlang grammar (Roberto Aloi)
f568f38 Configurable chunk for project-wide eqwalization (Roberto Aloi)
5e89d90 Configurable number of tasks for project-wide eqwalization (Roberto Aloi)
8895a71 Performance optimizations for project-wide eqwalization (Roberto Aloi)
5fd19ff Preliminary support for project-wide Eqwalizer diagnostics (Roberto Aloi)
0022987 Add EqwalizerConfig for IDE (Roberto Aloi)
6e22a87 Convert should_eqwalize to analysis method (Roberto Aloi)
7635718 On-the-fly collection of diagnostics (Victor Lanvin)
336d4ae fix a typo in a help message (Roman Perehonchuk)
2af4c7e Improvements to ElabApply with shapes (Victor Lanvin)
7b89b6d Improvements to maps:fold with shapes (Victor Lanvin)
4236b1e Snapshots -- lambdas with shapes and >2 clauses (Victor Lanvin)
ae703aa eqwalize multiple modules (Roman Perehonchuk)
02913ea Back out "Move erlang_service to use unix domain socket for communication" (Roberto Aloi)
6c703e5 Move erlang_service to use unix domain socket for communication (Michał Muskała)
1e5ee67 Bump eetf (Michał Muskała)
b9ec9e2 Fix unused field warning (Michał Muskała)
8c0fadd Add undefined function in export diagnostic as related info if syntax error in the function (Alan Zimmerman)
6ae0065 Back out "Remove test ignore for type-based tests" (Alan Zimmerman)
f96778c rework combining diagnostics: make combination symmetric (Alan Zimmerman)
690c4e0 BE: Remove On field from AnyCallBackCtx (Alan Zimmerman)
db161fc Add panic context for server vfs.file_contents call (Alan Zimmerman)
141baa4 BE: remove Diagnosti...

Read more

2024-03-21

21 Mar 16:13
Compare
Choose a tag to compare

Highlights

First batch of eqwalizer quick fixes, for spec mismatches

432263918_424477790162460_6032735865574995637_n
432389973_394938450197563_5652832251277663400_n

Improved completion by adding ok, undefined, true, false to keyword completion

Screenshot 2024-03-20 at 14 53 14

Improved feedback when a rename cannot be performed

Screenshot 2024-03-20 at 16 05 28

Changes

7c4b763 Bump VS Code extension version for imminent release (Alan Zimmerman)
f119709 Report an error if given L1500 for elp lint command (Alan Zimmerman)
961cf29 Fix tests after completion keywords update (Alan Zimmerman)
087c70c Use LSP 3.17 error code RequestFailed to report rename inapplicable (Alan Zimmerman)
bf2fec5 Completion: add common atoms to keywords (Alan Zimmerman)
39bc4eb Type assists 7/n: Improve assist wording (Alan Zimmerman)
573157a Type assists 6/n: expected type : leading atom tuple, fix spec (Alan Zimmerman)
2ae1108 BE: Introduce sema.find_enclosing_function_body, and helper for spec body (Alan Zimmerman)
f4b6fe8 Type assists 5/n: expected type : leading atom tuple, fix return value (Alan Zimmerman)
08a18f2 BE: make contains_annotation regex more lenient (Alan Zimmerman)
56a26a5 BE: Simplify expected_type code (Alan Zimmerman)
93ae1ef Add spec to FunctionBody (Alan Zimmerman)
0d9d932 Type test flakiness: Re-use erlang service connection for declarative tests (Alan Zimmerman)
90d65b1 BE:Fix some clippy warnings on ide crate (Alan Zimmerman)
b1f8432 Type Assists 4/n: mismatched atom, fix spec (Alan Zimmerman)
beeae5a BE: improve check_specific_fix (Alan Zimmerman)
c04a373 BE: strip annotations in expected fix test results (Alan Zimmerman)
a0d747a Type Assists 3/n: initial type based assist, for mismatched atom (Alan Zimmerman)
03cce8f Type Assists 2/n: Add initial plumbing for adding eqwalizer assists (Alan Zimmerman)
bfd9d13 Type Assists 1/n: Add eqwalizer assists to code_action request handler (Alan Zimmerman)
f1a6ab5 Put mutex around erlang service for tests (Alan Zimmerman)
2bd51fa Bump tree-sitter-erlang crate to 0.5.0 (Alan Zimmerman)
2a6c568 Bump version to 0.5.0 (Alan Zimmerman)
5a5ee4a bump tree-sitter to 0.22.1 (Alan Zimmerman)

2024-03-13

13 Mar 12:42
Compare
Choose a tag to compare

e6fdf63 Bump version in package.json (Roberto Aloi)
86b0213 BE: fix erlang_service_server request() type (Alan Zimmerman)
134982f Single collection of annotations (Roberto Aloi)
263b584 Avoid &String type and un-necessary cloning (Roberto Aloi)
44ca9b6 Re-export DiagnosticCode from top to simplify usage (Roberto Aloi)
3f16ba9 Remove unused Ignore struct (Roberto Aloi)
023009d Construct set of DiagnosticCode when extracting annotations (Roberto Aloi)
d0a31d6 Move DiagnosticCode from ide to ide_db crate (Roberto Aloi)
1cca863 Leverage metadata to decide when to suppress a diagnostic (Roberto Aloi)
b102268 Split metadata extraction into a separate query (Roberto Aloi)
4664abe Split collection of metadata from conversion to EETF format (Roberto Aloi)
cac672d Also collect generic ELP fixmes and ignores (Roberto Aloi)
00868a4 Make patterns for ELP Metadata extraction configurable (Roberto Aloi)
81ea215 Move tuple wrapping for eqwalizer_fixmes to fixme.rs (Roberto Aloi)
e5a9a9d Flakiness: Introduce a lock to serialise check_type test (Alan Zimmerman)
9636560 Bump mio to 0.8.11, and all cargo deps (Alan Zimmerman)
e4ea328 Add more context to eqwalizer ipc json decode (Alan Zimmerman)