Skip to content

release: 2026-01-10#463

Merged
aviatesk merged 21 commits intoreleasefrom
releases/2026-01-10
Jan 10, 2026
Merged

release: 2026-01-10#463
aviatesk merged 21 commits intoreleasefrom
releases/2026-01-10

Conversation

@aviatesk
Copy link
Owner

@aviatesk aviatesk commented Jan 10, 2026

This PR releases version 2026-01-10.

Checklist

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

Post-merge

  • The releases/2026-01-10 branch can be deleted after merging
  • CHANGELOG.md will be automatically updated on master

github-actions bot and others added 21 commits January 8, 2026 16:13
The `split_announcement_and_entries` function previously required the
Announcement section to be followed by an entry header (`### Fixed`,
etc.), causing it to fail when Announcement was at the end of the
content. This resulted in the Announcement being incorrectly included
in release sections of CHANGELOG.md.

Fix the regex to use a lookahead `(?=...|\Z)` that matches until either
an entry header OR end of string, allowing extraction regardless of
position.

Also move the Announcement section in CHANGELOG.md back to Unreleased
where it belongs (it was incorrectly placed in 2026-01-09 due to this
bug).

Written by Claude
The `toplevel_lowering_diagnostics` function was using the cell URI
directly to look up analysis context, but full-analysis caches results
under the notebook URI. This caused `has_analyzed_context` to return
`false` for notebook cells, skipping context-dependent diagnostics like
undefined global variable detection and macro expansion errors.

Move `has_analyzed_context` to `server.jl` and have it automatically
resolve notebook URIs internally, following the same pattern as
`get_context_info`. This simplifies `toplevel_lowering_diagnostics` and
ensures consistent notebook URI handling across the codebase.
Fix `textDocument/formatting` and `textDocument/rangeFormatting` for
notebook cells. Previously, formatting requests for notebook cells
failed with "file cache not found" errors because the handlers used
the 2-argument `get_file_info` which doesn't perform notebook URI
lookup.

Changes:
- Add `cancel_flag` to formatting handlers and use 3-argument
  `get_file_info` for proper notebook URI lookup
- Add `get_cell_text` to extract individual cell text from notebook
- Add `cell_range` to compute cell-local range with proper encoding
- Refactor `format_file` to handle notebook cells by formatting only
  the target cell's text and returning cell-local edit ranges
- Rename internal formatter execution to `run_formatter`
- Add `settings` parameter to test `withserver` for custom formatter
  configuration
- Add notebook formatting tests using `cat` as test formatter

Fixes the first issue of #442.
Sort keyword arguments by definition order when semicolon is present
in call signature, otherwise use default max sort text to maintain
existing behavior for mixed completion contexts.
Add LSP type definitions for the `textDocument/documentSymbol` request:
- `DocumentSymbolClientCapabilities`
- `DocumentSymbolOptions`
- `DocumentSymbolRegistrationOptions`
- `DocumentSymbolParams`
- `DocumentSymbol`
- `DocumentSymbolRequest`
- `DocumentSymbolResponse`

Enable `documentSymbolProvider` in `ServerCapabilities` and
`documentSymbol` in `TextDocumentClientCapabilities`.

Written by Claude

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously, requests were marked as handled immediately after the
handler returned, even when the handler only sent a progress create
request and the actual work was pending. This caused `$/cancelRequest`
to be ignored because the request was already in `handled_history`.

Fix by marking requests as handled only when the actual response is
sent:
- Add `message_queue` field to `ServerState` for centralized message
  queue management
- Move `HandledToken` struct to `types.jl` for broader accessibility
- Update `send` to put `HandledToken` when sending a response message
- Update `send_progress` to put `HandledToken` when sending
  `WorkDoneProgressEnd`

This ensures cancellation works correctly for requests that use
server-initiated progress (workspace/symbol, rename, references, etc.).
…gress

Previously, formatting requests with server-initiated progress only supported
cancellation via `$/cancelRequest` on the original request. This commit adds
support for cancellation via the progress UI (`window/workDoneProgress/cancel`).

Key changes:
- Add `AbstractCancelFlag` type hierarchy and `CombinedCancelFlag` to combine
  two cancellation sources (original request + progress token)
- Add `cancellable_token` for `FormattingProgressCaller` and
  `RangeFormattingProgressCaller` to register progress tokens for cancellation
- Update progress handlers to receive and combine both cancel flags
- Set `cancellable = true` in `WorkDoneProgressBegin` to show cancel button

Written by Claude
Add proper cancellation support for server-initiated progress in
find-references and rename features. Previously, when the client sent
`$/cancelRequest` for the original request, the server-initiated
progress work would continue running.

Key changes:
- Add `cancel_flag` field to `ReferencesProgressCaller` and
  `RenameProgressCaller` to store the original request's cancel flag
- Use `CombinedCancelFlag` to check both original request cancellation
  and progress UI cancellation (`window/workDoneProgress/cancel`)
- Add `cancellable = true` to `WorkDoneProgressBegin` and
  `WorkDoneProgressReport` to show cancel button in UI
- Add `is_cancelled` checks in file search loops

Also refactors the function structure to follow a consistent pattern:
- `do_X` takes `cancel_flag` as required positional argument, `token`
  as keyword argument, calls subroutine and sends response
- `X` subroutine (e.g., `find_references`, `rename`) does the work and
  returns result without sending
Extract main loop into separate functions (`collect_global_references!`,
`collect_global_rename_edits!`) and wrap with try/catch/finally to ensure
progress end is always sent.

Both functions now return `Bool` for completion status. On error or
cancellation, appropriate `ResponseError` is returned to the client.
Return empty results instead of errors for LSP requests on documents
that haven't been synchronized via `textDocument/didOpen`.

Previously, JETLS would return `ResponseError` when a file wasn't in
the cache. This violated the LSP specification which states that "a
server's ability to fulfill requests is independent of whether a text
document is open or closed."

Now `get_file_info` returns `nothing` on timeout (reduced from 30s to
10s), and all request handlers return valid empty results (`null` or
empty collections) instead of errors.

---

- Fixes #442
Add a new diagnostic that reports variables captured by closures that
require boxing due to being assigned multiple times. Boxed variables
are stored in `Core.Box`, which can cause type instability and hinder
compiler optimizations.

The implementation uses JuliaLowering's `convert_closures` pass to
detect boxed bindings via `JL.is_boxed(binfo)`. The diagnostic includes
`relatedInformation` showing where the variable is captured, pointing
to the actual reference location inside the closure.

However, JuliaLowering's closure conversion currently uses very
primitive analysis for eliminating captured boxed variables, and reports
captured boxed variables in more cases than the flisp lowerer,
which implements captured variable detection based on basic dominance
analysis on linearized IR.
As a result, this commit's reports include a considerable number of
false positives (in a sense that true positives are those that appear
in flisp-based code execution).
However, this issue should be resolved by improvements on the JL side.
@aviatesk aviatesk merged commit 8b3c9db into release Jan 10, 2026
7 checks passed
@aviatesk aviatesk deleted the releases/2026-01-10 branch January 10, 2026 11:57
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