Skip to content

release: 2025-12-18#406

Merged
aviatesk merged 44 commits intoreleasefrom
releases/2025-12-18
Dec 18, 2025
Merged

release: 2025-12-18#406
aviatesk merged 44 commits intoreleasefrom
releases/2025-12-18

Conversation

@aviatesk
Copy link
Owner

@aviatesk aviatesk commented Dec 18, 2025

This PR releases version 2025-12-18.

Checklist

  • release / Test JETLS.jl with release environment
  • release / Test jetls executable with release environment

Post-merge

  • The releases/2025-12-18 branch can be deleted after merging
  • CHANGELOG.md will be automatically updated on master

github-actions bot and others added 30 commits December 12, 2025 06:03
Previously, arguments used in keyword function calls (generated by
Julia's lowering for functions with keyword arguments) were incorrectly
counted as "used", preventing proper unused argument diagnostics. For
example, in `func(a; kw) = a`, the `kw` argument would not be reported
as unused.

This change extends the argument usage skip logic to handle:
- Keyword function calls (`#funcname#N` pattern)
- `kwerr` calls from `Core.TopNode`

Also fixes a minor bug where `start_idx` was not used in the loop.

Fixes #390
Previously, dot-prefixed completions like `xarg.x` would show irrelevant
global completions when the prefix type could not be resolved. Now,
completions are disabled entirely in such cases, returning no results.

This provides a cleaner user experience by not showing unrelated suggestions.
Property completions for non-module values may be added in the future.

Fixes #389
Add completion support for Julia keywords. Keywords are sourced from
`REPL.REPLCompletions.sorted_keywords` and `sorted_keyvals`.

Keywords are given the lowest sort priority (`max_sort_text3`) so they
should appear after local variables and globals. They are excluded from
macro invocation and latex/emoji completion contexts.

Closes #386.
Allow `module_name` to be omitted in `module_overrides` configuration.
When `module_name` is not specified, analysis for matching files is
disabled and `OutOfScope()` is returned without a module context,
effectively disabling full-analysis for the files.
Rename the struct and field for clarity, as it controls analysis
behavior more broadly than just module context.
Initialization options can now be configured via the
`[initialization_options]` section in `.JETLSConfig.toml`, in addition
to editor-specific LSP settings. This provides a client-agnostic way to
configure initialization options that can be committed to version
control.

When both sources are present, file-based configuration takes precedence
(file > client > default), as like the dynamic configuration. But I may
revise this priority rule in the very near future.
Use `show_[warning|error]_message` to notify users about configuration
errors in `.JETLSConfig.toml` initialization options, such as TOML parse
errors or invalid option values.
Make InitOptions a ConfigSection subtype, enabling initialization options
to be set via .JETLSConfig.toml and tracked by the configuration change
notification system.

Also improve changed_settings_message to clearly distinguish between
immediately applied changes and those pending server restart.
This commit implements a prototype of Revise-based incremental
full-analysis. The idea is to delegate package state management to
Revise, similar to JET v0.11, enabling fast updates of analysis results
when incremental changes are made while avoiding issues like #357.

Although this implementation is incomplete, it works at least for JETLS
itself and its dependencies, making it possible to experiment with
various feature extensions that Revise-based incremental analysis
enables. For example, this approach makes it practical to cache type
inference results in `FileInfo` and update them on `DidChange` (though
memory leak risks return). This would make dynamic diagnostics, type on
hover, and inlay hints more feasible.

The following incomplete aspects need to be addressed for complete
migration to this new analysis approach:

- This mode is only enabled when `JETLS_DEV_MODE` is active.
  This is because JETLS currently loads Revise only when
  `JETLS_DEV_MODE` is enabled, and this feature relies on that Revise
  instance. However, there is no guarantee that existing analysis and
  Revise won't interfere with each other.
  I will enable this mode outside of `JETLS_DEV_MODE` only after I
  better understand Revise internals and can achieve finer-grained
  control over Revise's automatic file watching, allowing us to safely
  load Revise (or ReviseCore?) in a secure manner.

- Code loading is not yet implemented. This could be easily implemented
  using `Base.require`, but currently we use the approach of looking up
  `module_name` specified in `analysis_overrides` of initialization
  options from `Base.loaded_modules`. This means external packages
  cannot be analyzed with this new method - only packages already loaded
  as JETLS dependencies at server initialization.
  This is also related to the fact that this mode currently only works
  for package code. We need to reconsider how to load and analyze
  script code as well.

- The Revise-based tracking system needs adjustment for special packages
  like `Base` and `Compiler`.

- Generally, my understanding of Revise is still insufficient and the
  package monitoring approach may be immature.

Also checks in the changes for .JETLSConfig.toml to enable this new
analysis mode for JETLS itself.
In particular `Sys.DATAROOTDIR` is no longer defined, so we need to use
`Sys.BINDIR/../..` instead.
Use hyphens as the default word separator in file names. Use underscores
only when the file name corresponds directly to Julia code (e.g., module
names), since Julia identifiers cannot contain hyphens.

This commit renames files to follow this convention and updates all
corresponding include statements. The naming rule is now documented in
AGENTS.md.
Refactor `InterpretationStateCache` to use an explicit `target_modules`
field instead of a lazily-computed cache, simplifying the code.

Also allows the interactive `[@]analyze_call` utilities to set
`target_modules` for testing purposes.
Rename `select_target_node` to `select_target_identifier` and
`select_dotprefix_node` to `select_dotprefix_identifier` for better
clarity about their purpose.
Previously, when a file was closed or when test structure changes
removed all diagnostics for a URI, the client would not receive a
notification to clear the stale diagnostics because the URI was simply
absent from the diagnostics map.

This adds an `ensure_cleared` parameter to `notify_diagnostics!` that
guarantees an empty diagnostics notification is sent for the specified
URI, ensuring the client clears any previously displayed diagnostics.
Add the ability to rename files referenced in string literals. When the
cursor is on a string that refers to an existing file path (e.g., in
`include("foo.jl")`), the rename operation now renames both the file on
disk and updates the string reference in the source code.
aviatesk and others added 14 commits December 17, 2025 21:11
Add explicit `local` to the inner `message` variable to prevent it from
overwriting the outer `message` used in the returned Diagnostic. Without
this, the diagnostic message would be replaced by the last frame's
message from the loop, causing "message must be set" errors.

Probably fixes #393.
Removed `byte_ancestors` function overloads that operated on
`JS.SyntaxNode` since they were no longer used anywhere.
Add static analysis for field access errors by hooking into
`CC.builtin_tfunction` to intercept `getfield`, `setfield!`,
`fieldtype`, and `getglobal` calls.

Two new report types are introduced:
- `FieldErrorReport` (`inference/field-error`): reported when accessing
  a non-existent field by name
- `BoundsErrorReport` (`inference/bounds-error`): reported when
  accessing a field by an out-of-bounds integer index

Note that the `inference/bounds-error` diagnostic is reported when code
attempts to access a struct field using an integer index that is out of
bounds, such as `getfield(x, i)` or tuple indexing `tpl[i]`, and not
reported for arrays, since the compiler doesn't track array shape
information.

Reports from invalid `setfield!` and `fieldtype`, and general invalid
argument types are left as future TODO.

Also adjusts concrete evaluation logic to enable ad-hoc constant
propagation after failed concrete evaluation for better accuracy.
Detected by the new field analysis.
This ensures duplicate reports are properly deduplicated according to
JET's aggregation policy before converting to LSP diagnostics.
@aviatesk aviatesk merged commit c9c5729 into release Dec 18, 2025
7 checks passed
@aviatesk aviatesk deleted the releases/2025-12-18 branch December 18, 2025 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant