Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore(lsp): update tower-lsp-server to 0.24.0-rc.1 - #26574

Open
Sysix wants to merge 1 commit into
mainfrom
09-12-chore_lsp_update_tower-lsp-server_to_0.24.0-rc.1
Open

chore(lsp): update tower-lsp-server to 0.24.0-rc.1#26574
Sysix wants to merge 1 commit into
mainfrom
09-12-chore_lsp_update_tower-lsp-server_to_0.24.0-rc.1

Conversation

@Sysix

@Sysix Sysix commented Sep 12, 2026

Copy link
Copy Markdown
Member

This is a (draft) PR for the upcoming tower-lsp-server version.
The new version has many breaking changes like:

Changes

Sysix commented Sep 12, 2026

Copy link
Copy Markdown
Member Author

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions Bot added A-linter Area - Linter A-cli Area - CLI A-editor Area - Editor and Language Server A-formatter Area - Formatter labels Sep 12, 2026
@codspeed-hq

codspeed-hq Bot commented Sep 12, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 72 untouched benchmarks
⏩ 9 skipped benchmarks1


Comparing 09-12-chore_lsp_update_tower-lsp-server_to_0.24.0-rc.1 (51af350) with main (5b4787f)

Open in CodSpeed

Footnotes

  1. 9 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Sysix
Sysix force-pushed the 09-12-chore_lsp_update_tower-lsp-server_to_0.24.0-rc.1 branch 9 times, most recently from 6849304 to b2ce755 Compare September 12, 2026 20:05
@Sysix
Sysix requested a lite review from Copilot September 12, 2026 20:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Unresolved URI-scheme handling regressions affect worker and formatter workflows.

Pull request overview

Migrates Oxc’s LSP integrations to tower-lsp-server 0.24.0-rc.1 and gen-lsp-types, replacing the removed UriExt helpers.

Changes:

  • Updates LSP types, capabilities, diagnostics, code actions, and handlers.
  • Adds repository-owned URI/path conversion utilities.
  • Refreshes dependencies, tests, and LSP snapshots.
File summaries
File Reviewed change
crates/oxc_language_server/src/worker.rs Migrates worker LSP types and handling.
crates/oxc_language_server/src/worker_manager.rs Updates URI handling and worker management.
crates/oxc_language_server/src/uri_utils.rs Adds URI/path conversion helpers and tests.
crates/oxc_language_server/src/tool.rs Updates tool code-action types.
crates/oxc_language_server/src/tool_params.rs Migrates tool parameter types.
crates/oxc_language_server/src/tests.rs Updates LSP test requests and assertions.
crates/oxc_language_server/src/position.rs Migrates position types.
crates/oxc_language_server/src/options.rs Updates URI and option handling.
crates/oxc_language_server/src/lib.rs Exposes URI utilities and new types.
crates/oxc_language_server/src/file_system.rs Uses shared URI conversion.
crates/oxc_language_server/src/capabilities.rs Migrates server capabilities.
crates/oxc_language_server/src/backend.rs Updates backend handlers and diagnostics.
crates/oxc_language_server/Cargo.toml Updates dependencies and features.
Cargo.toml Updates the LSP server dependency.
Cargo.lock Refreshes dependency resolution.
apps/oxlint/src/lsp/utils.rs Migrates LSP range types.
apps/oxlint/src/lsp/tester.rs Updates LSP test utilities.
apps/oxlint/src/lsp/snapshots/[email protected] Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/fixtures_lsp_tsgolint@no-floating-promises__index.ts.snap Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected] Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected] Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/fixtures_lsp_tsgolint_type_aware_config@test-with-lsp-config.ts.snap Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected]_nested__test.ts.snap Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/fixtures_lsp_ts_path_alias@deep__src__dep-a.ts.snap Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected] Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected] Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected] Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/fixtures_lsp_multiple_suggestions@forward_ref.ts.snap Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected] Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected] Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/fixtures_lsp_issue_22758_apps_api@app__auth__guard__firebase.ts.snap Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected] Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected]_invalid.vue.snap Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected]_another_config__not-ignored-file.ts.snap Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/fixtures_lsp_frameworks@astro__debugger.astro_vue__debugger.vue_svelte__debugger.svelte_nextjs__[[..rest]]__debugger.ts.snap Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/fixtures_lsp_deny_no_console@hello_world.js.snap Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected] Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected] Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected]_folder__folder-dep-a.ts.snap Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected] Refreshes the generated snapshot.
apps/oxlint/src/lsp/snapshots/[email protected] Refreshes the generated snapshot.
apps/oxlint/src/lsp/server_linter.rs Migrates linter LSP APIs and URI handling.
apps/oxlint/src/lsp/error_with_position.rs Updates diagnostic representations.
apps/oxlint/src/lsp/code_actions.rs Migrates code-action types.
apps/oxlint/Cargo.toml Updates LSP feature configuration.
apps/oxfmt/src/lsp/server_formatter.rs Migrates formatter APIs and URI handling.
apps/oxfmt/src/lsp/mod.rs Updates formatter URI imports.
apps/oxfmt/Cargo.toml Updates LSP feature configuration.
Review details

Suppressed comments (6)

apps/oxfmt/src/lsp/server_formatter.rs:241

  • This textual prefix check changes the previous scheme-based behavior: a valid file:/path/to/file.js URI takes the in-memory formatting branch, which can fail with In-memory formatting requires content, instead of reading and formatting the file. Test the parsed URI scheme here rather than matching only file://.
        let (result, source_text) = if document.uri.as_ref().starts_with("file://") {

crates/oxc_language_server/src/backend.rs:684

  • The single-file worker is now created only for strings beginning with file://. For a valid file:/path/to/file.js URI, did_open skips worker creation, so the file is stored but never linted or formatted through a workspace. Check the parsed URI scheme instead of requiring this exact textual prefix.
    crates/oxc_language_server/src/uri_utils.rs:82
  • This changes the common URI-to-path conversion from the removed UriExt's borrowed Cow<Path> result to an owned PathBuf, so every unescaped file URI now allocates. The helper is used on frequent lint/format requests and workspace lookups; please preserve the borrowed fast path (allocating only when decoding or platform conversion requires it), or otherwise measure and justify this regression.
    crates/oxc_language_server/src/uri_utils.rs:108
  • This documentation says None is returned when the file does not exist, but absolute paths bypass strict_canonicalize at lines 111-113 and are converted even when they do not exist; only relative paths are checked. Please document the actual behavior or add an existence check for absolute paths if that contract is intended.
    crates/oxc_language_server/src/uri_utils.rs:109
  • This adds a second non-trivial path-to-URI encoder alongside the existing from_file_path implementation in crates/oxc_diagnostics/src/service.rs:251-310. Maintaining both copies makes future URI/path fixes—especially platform-specific encoding changes—easy to apply in one subsystem but not the other; please centralize the shared conversion logic in a lower-level module.
    crates/oxc_language_server/src/worker_manager.rs:225
  • This replaces the parsed scheme check with a raw file:// prefix check. A valid URI with the file scheme but a single-slash form such as file:/path/to/file.js is now treated as non-file and routed to the fallback worker, changing the previous behavior. Use the parsed URI scheme here, and apply the same correction to the single-file and formatter checks.
  • Files reviewed: 47/48 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@Sysix
Sysix force-pushed the 09-12-chore_lsp_update_tower-lsp-server_to_0.24.0-rc.1 branch from b2ce755 to 01f029d Compare September 12, 2026 20:35
@Sysix
Sysix requested a lite review from Copilot September 12, 2026 20:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The broad breaking LSP migration warrants final human validation.

Review details

Suppressed comments (3)

crates/oxc_language_server/src/uri_utils.rs:76

  • Returning an owned PathBuf here loses the Cow<Path> behavior of the removed UriExt: ordinary unescaped URIs could previously borrow their path. This helper is used on per-file lint/format and worker-lookup paths, so the migration now allocates for every URI conversion; preserve a borrowed Cow return and materialize only where ownership is required.
    crates/oxc_language_server/src/uri_utils.rs:3
  • Please fix the grammar in this new module comment (this util functions).
    crates/oxc_language_server/src/worker.rs:517
  • The fallback panic still names the removed GlobPattern::String variant, so a failed assertion now reports the wrong expected variant. Update the message to GlobPattern::Pattern to match the branch above.
  • Files reviewed: 47/48 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread crates/oxc_language_server/src/uri_utils.rs Outdated
@Sysix
Sysix force-pushed the 09-12-chore_lsp_update_tower-lsp-server_to_0.24.0-rc.1 branch from 01f029d to 51af350 Compare September 12, 2026 21:11
@Sysix
Sysix marked this pull request as ready for review September 12, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-editor Area - Editor and Language Server A-formatter Area - Formatter A-linter Area - Linter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants