Repository navigation
fix(lsp): re-check only affected projects (#384); lspkit 0.6.0 - #413
Merged
Merged
Conversation
…cold run leaves the next one warm
MelbourneDeveloper
added a commit
that referenced
this pull request
Nov 20, 2026
## TL;DR Moves the language server to lspkit 0.10.1 and drops dependencies nothing uses. ## Details - **lspkit 0.6.0 → 0.10.1:** `lspkit`, `lspkit-server` and `lsp-profiler` in `src/toolchain/Cargo.toml`, plus `@nimblesite/lsp-profiler-ui` ^0.10.0, which is its newest release. - The releases in between fix leaks and lifecycles: an abandoned cooperative attach now stops the in-process sampler, forwarder tasks are owned and pinned, Python memory tracking is released on stop, and decoration types are disposed. - 0.10.1 also fixes the frame drain (lspkit #55) and logs dropped sidecar notifications, which adds a `tracing` edge. - Osprey uses no API that changed. `lsp-profiler` still pins `sysinfo` 0.39.3, which matches the workspace. - **Unused dependencies removed:** - `thiserror` from `lsp-profiler-osprey`. - `ts-node` and its `.vscodeignore` line from the VS Code extension. - `@11ty/eleventy-plugin-syntaxhighlight` and `markdown-it-anchor` from the website. - `@osprey/graphics` and `@osprey/json` from `signal_flow` and `vscode`, and `@osprey/json` from `uitest`. These packages never import them; `@osprey/native` brings them in. - **Kept:** the website's `markdown-it` devDependency. `tests/pages.spec.js` calls `require("markdown-it")`, which fails with `MODULE_NOT_FOUND` once the package is gone from the top level. - `docs/plans/lspkit-leak-upgrade.md` now records the pinned version. ## How Do The Automated Tests Prove It Works? - The LSP suites run on lspkit 0.10.1: `cargo test -p osprey-lsp` and the `live_profiler_lsp` end-to-end test, which drives lspkit's profiler service and covers `$/cancelRequest`. The VS Code extension's LSP suite runs as well. - The website test `long authored guides retain a useful image or inline video per 500 prose words` passes with `markdown-it` restored. Without it, it fails with `MODULE_NOT_FOUND`. - The package matrix test `the_package_matrix_runs_all_62_suite_backend_pairs_once` builds `signal_flow`, `uitest` and `vscode` without the removed manifest entries. - Local `make ci` on macOS: lint, build and every test pass. The three Rust coverage gates that fail only on macOS (osprey-cli, osprey-lsp, osprey-types) are the same ones that failed locally for #413, whose Linux CI passed them. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
A watched file save or a tab close now re-checks only the projects it affects instead of the whole repository, which ends the idle 100% CPU in
osprey lsp(#384). Osprey also moves to lspkit 0.6.0.Details
Language server (#384)
New
scope::rescope(server/scope.rs). It handlesworkspace/didChangeWatchedFilesandtextDocument/didClose, and queues only:A sweep already in progress keeps its queue instead of restarting.
Before this, every save and every close called
refresh, which re-queued every closed file in the repository. The cache keeps only 4 closed projects (fix(lsp): release closed projects the diagnostics sweep has passed #411), so each save re-analysed all 191 projects in this repository, and a stream of saves never let the server settle.refreshstill re-sweeps everything forinitialized, configuration changes and workspace-folder changes. Both paths share onerescan.New
server/scope/files.rsholds the disk discovery helpers moved out ofscope.rs, which keeps that file under 500 lines.New
watched()inserver.rsextracts the URIs a watched-files notification names.Dependencies
lspkit,lspkit-serverandlsp-profiler0.5.0 → 0.6.0, and@nimblesite/lsp-profiler-ui^0.4.0 → ^0.6.0. Osprey needed no code changes.humantime(RUSTSEC-2026-0542),rmpandrmp-serdeleaveCargo.lock.CI
gpui.yml, the macOS job now builds the host in its own step and saves the GPUI host cache right after, as the Linux job does. Before, a cold build that hit the 20-minute limit lost its post-step save, so every rerun started cold again.Docs
docs/plans/lsp-memory.md: the CPU fix and the 0.6.0 upgrade steps are ticked.How Do The Automated Tests Prove It Works?
New test:
server::tests::features::watched_changes_recheck_only_the_projects_they_affectdrives the real framed server over an 8-project workspace. It asserts that the first sweep publishes every project, then counts project analyses after each event:redundant-annotationwarning is published;.tsfile → 0 analyses.After each event, no other document is republished. Before the fix, the save step failed with
a save re-checked 8 projects(left: 8, right: 1).Existing suites: all 259
osprey-lsptests pass, includingdiagnostic_scope_initial_roots_unsaved_python_and_workspace_changes, which covers that a close restores the disk warning and that a deleted file's findings clear. All 21lsp-profiler-ospreytests pass on 0.6.0.CI: CI run 44259894341 is green. On its second attempt, the macOS job restored the cache the first attempt saved.
Refs #384. It stays open until a released binary is verified.
🤖 Generated with Claude Code