Repository navigation
Conversation
11f3c94 to
2dd4e31
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
It is an explicitly non-mergeable reference draft aggregating multiple foundation PRs and sweeping compiler, build, and multi-editor changes across ~900 files, which requires human review and a deliberate landing plan.
2 open findings
What changed in this PR
This PR assembles the complete compiler-backed Language Server Protocol (LSP) implementation for Ecstasy/XVM into a single buildable branch, combining several in-flight foundation PRs (#683 repository-read observation, #685 embedding/diagnostic-ownership and the ErrorListener API migration, #686 transient-local lifecycle, #687 callable typing, #692 binary-AST removal) with the language server, IntelliJ plugin, and VS Code extension. It is explicitly labeled a reference draft that "SHOULD LIKELY NOT BE MERGED AS IS", intended so reviewers can build and exercise the full editing experience while the smaller foundation PRs are reviewed independently. It bumps the .xtc format to 0.20261012 and removes the abandoned binary-AST record slot entirely (no legacy compatibility shim).
Changes:
- Migrates compiler diagnostics to an operation-owned
ErrorListenercontract (logreturns void; callers consultisAbortDesired();BLACKHOLE→silent(PROBE/DISCARD);SafeLookAhead→Attempt), adds embedding/snapshot/cancellation APIs, and removes the binary-AST classes. - Adds the Kotlin LSP server plus IntelliJ and VS Code integrations (diagnostics, navigation, completion, hierarchies, theme highlighting, CodeLens, checked refactorings, incomplete/unsaved-source analysis), with a compiler/Tree-sitter adapter switch.
- Enables the language build and compiler adapter in
gradle.properties, consolidates the XDK library bundle, updates IntelliJ/LSP4IJ/VS Code tooling versions, and adds extensive compiler/server/editor test fixtures and a manual playbook.
| File | Description |
|---|---|
javatools/src/main/java/org/xvm/asm/ErrorListener.java |
Core of the diagnostic-ownership migration (void reporting + isAbortDesired/silent/at/in helpers). |
javatools/src/main/java/org/xvm/api/EmbeddingSupport.java |
Host-facing compile/analyze/run APIs; errs enforced non-null via requireNonNull in run(). |
javatools/src/main/java/org/xvm/api/InterpreterControl.java |
finish() now reports via errs.error(...); safe since callers guarantee non-null listener. |
javatools/src/main/java/org/xvm/tool/TestRunner.java |
Launcher migrated to the new listener contract; javadoc still says "optional" (flagged). |
javatools/src/test/java/org/xvm/compiler/ParserTest.java |
Tests Parser.Attempt recovery; comment grammar regression flagged. |
lang/lsp-server/src/main/kotlin/org/xvm/lsp/** |
Document service, XDK adapter, model conversions (Lsp4jConversions, SymbolInfo) for compiler-backed features. |
lang/intellij-plugin/**, lang/vscode-extension/** |
Native editor actions, adapter selection, settings reporting, and acceptance harnesses. |
gradle.properties, gradle/libs.versions.toml, xdk/build.gradle.kts, version.properties |
Enables language build/compiler adapter, raises metaspace, consolidates XDK bundle, bumps .xtc format. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
d83e765 to
a86cfef
Compare
4a75f4b to
672b96f
Compare
8f0d178 to
4c87387
Compare
Take #693's version of the files its own commits changed: the review fixes, the dropped repository reporting and cache changes, and the deduplications. Where errs has its own edits in those files, keep them on top of #693's version: the diagnostic origin POC, the duplicate source type regression task, the partial-analysis nesting test, the f_errs field names and unnamed variables, and the Indents cleanup.
4c87387 to
a37d5dd
Compare
- javatools/LSP-COMPILER.md is now javatools/lsp-compiler.md, matching the other lowercase guides; links in javatools/README.md, docs/errs-error-listeners.md and the guide itself follow. - lang/README.md, lang/lsp-server/README.md, editor-setup.md and plugin/README.md pointed at CLAUDE.md for project rules; they now link AGENTS.md (#composite-build-semantics), which holds them. CLAUDE.md only includes AGENTS.md. Draft #693 and the outside-lang comparison branch still use the old file name; mirror this rename there when they are next synchronized.
- docs/errs-integration-plan.md: R1-R5 marked partial with what the delivery covers, and a new "Embedded build and run R2-R5" section with the commit and extraction map (5a14da2, 94a1e8c, 1a89eb1, 50fb713, 590935e), the proposed homes (a small runtime-execution PR outside lang/ for the three javatools/lib_runner files; #693 or the editor review for lang/; mirror the lsp-compiler.md rename), and the validation receipt with commands. - pr-roadmap.md: a dated entry noting this work is outside every prepared branch and PR, including #693, and is not mirrored yet; the deferred-work line no longer says runtime execution is absent. - docs/errs.md: a dated summary, the execution-architecture note, and runMethod in the embedding API table.
A backlog sweep of the tracking and planning documents found items still presented as open although later sections, the code or GitHub show them done, superseded or changed. Each was checked against its closing evidence before editing: the later journal section, the code (git grep / git log), or `gh pr view`. Dated journal entries keep their history: an unchecked box that later work closed is ticked with a "Done later" pointer, and a dated statement that still read as current gets a short "Later:" or "Superseded:" line. Current-status tables and undated status text are updated in place. Integration plan (docs/errs-integration-plan.md): - Ticked, with the closing section linked: demo notification cleanup, PLAT2c/L67, PLAT2e, the cursor/header forms (superseded by L57–L59/L64), the native IntelliJ parity checkpoint, the retained heap growth (TransientThreadLocal fix; October 8 growth below 150 KB over 1,800 cycles), the combined gate rerun, the uninterrupted IntelliJ receipt, L62 cross-module/overlapping moves, the support bundle and failure links, and the L63 items the closure implemented within its bounds. - Kept open with what remains: visible Cancel is done but UP16/UP17 and platform acceptance are not; X105 has not recurred but was never diagnosed; mutable captures, inverse substitution, runtime Class/Type values without a source owner and explicit generic qualifiers were moved out of L63 scope and are still unimplemented; dependent/dynamic type shapes are still refused; remote-host acceptance moves to L82. Journals (docs/errs.md, docs/errs-audit.md): - Status table rows 2.2 (highlights do distinguish read/write), 3.5 (partial: cross-file definition/references over the source graph; no persistent index), 3.6 (bounded compiler-only completion and signature help) and 4.2 (final-type checks pinned by TypeInfoFinalCompositionTest; the 70-message survey stays open) now state the current state. - "Later:" pointers for the 121-call recount, positioning, AST2/AST4, the build-model import, the uninterrupted IntelliJ runs, visible Cancel and shared-process windows, and the heap growth. Playbook (lang/doc/manual-test-plan.md): - The heap paragraph no longer calls the October 1 run "the latest" with growth under investigation; it records the fix and the October 6/8 runs. Multi-hour and platform evidence stay open. Visible Cancel pointers added; §14 signature help and §15 document links name the compiler adapter as well as Tree-sitter. PR roadmap (pr-roadmap.md), from gh on 2026-10-16: - #685 was closed unmerged on 2026-10-12, not merged as the roadmap said. #683 was closed unmerged on 2026-10-15. #686, #687, #688 and #689 are merged; #687 merged as df29154 with four files, not the six or three the roadmap gave in two places. #693 is open and no longer a draft. Plans and guides (lang/doc/plans/*, lang/README.md, docs/errs-upstream-issues.md): - Dated status notes: the naming audit is done (no user-facing "XTC" in the five listed IntelliJ files; only KDoc, log messages and the icon path), per-file Tree-sitter re-indexing, the obsolete conditional Tree-sitter build, format on save, the VS Code plan (implemented except runtime debugging and Marketplace publishing), VS Code commands, compiler doc generation, workspace-wide hierarchy and editor workspace discovery in IntelliJ, compiler-backed semantics. - formatting-plan: the manual checklist points to §13a and OnTypeFormattingTest; the `)` outdent, `->` indent and `/**` skeleton items are struck through with their tests. - Upstream register: UP23 and UP24 rows added from the doc's own sections; the UP01–UP29 rows were split across three fragments (blank lines and a repeated header made two of them render as plain text) and are one table again. A stray "j" before conditional-build.md's title is removed. Validation: documentation only. All 57 new relative links and anchors resolve (checked by script against each target's headings); git diff --check is clean. PR states were read with gh. Limits: several closing pointers cite commit hashes from before the 2026-10-05 rebase, following the documents' existing convention; those commits live on backup/errs-pre-master-rebase-20261005, not in this branch's history. The L63 consolidated list still ticks some forms (runtime Class/Type receivers, capture preservation) more broadly than its closure table supports; its own caveat limits the ticks to the closure's supported forms, so it is left as written.
Adds "Console input, embedded build snapshots and stale-document follow-up (2026-10-16)" to the integration plan: the seven commits after c308bd7, each with its extraction target, plus their receipts. 82b6ba5 splits on the directory boundary like 5a14da2: its javatools part joins the proposed runtime-execution PR, which then needs its own javatools test. The R2, R3, R5 and R6 lines of the runtime checklist now say what those commits delivered. The PR roadmap gets one row pointing to the map. Validation: documentation only; the roadmap's anchor matches the new heading, and git diff --check is clean. Limits: nothing is mirrored into #693 or the review branches yet, as decided; the full catalog and combined-suite checkpoint is still to run.
docs/errs-integration-plan.md, 2026-10-16 map: - rows for 3046c57 (playbook focus), a975e96, 2c48a55 and 5a94657 (embedded as the default build mode), the reverted attempts 78032ae, f1d323b and 174518d (nothing to extract), and b7cb7df and 7460633 (#693 server, with 3f9c1ee); - what went wrong after 3f9c1ee (X116, X273, X274), the two causes, why the first attempts were reverted, and the receipts at 7460633; - the DocumentLockTest race, with an open item to make that case deterministic. The X273 item records that its initial invalidation is diagnosed and fixed in b7cb7df. It stays open: LSP has no color refresh, so a genuine recompile while a color request waits still leaves no swatches until the next edit. pr-roadmap.md: a row for 3046c57…74606334e pointing to the map. Validation: documentation only. Commits, run identifiers and counts were checked against git and the newest results.json of each run; the new link uses the same anchor as the existing roadmap row.
- plan-embedded-execution.md: status, a "First delivery (2026-10-15)" section with the decisions taken (automatic default mode, save all before building, one persistent worker per server, no debugging yet, builds on the existing compile queue), what was delivered per area, known limits, and partial progress on R1-R5. - plans/README.md lists the plan; plan-ide-integration.md, idea-specific.md, vscode-specific.md and plan-dap-debugging.md get status notes where they described Run, tasks or DAP as missing. - manual-test-plan.md: Run lens cases now need a callable run method, a new section 18a covers embedded build, errors, unsaved edits, run, arguments, stop, rerun, Gradle mode, F5 and configuration migration, and the V9 task and code-lens rows describe the build mode. - lang/README.md and lang/doc/README.md link the feature. On #693 the plan documents stay as on master: this copy adds plan-embedded-execution.md, which the guides link to, and its row in the plans index, without the plan's link to the errs integration plan; the plan-ide-integration, idea-specific and vscode-specific status notes are not copied. (cherry picked from commit 50fb713)
- javatools/LSP-COMPILER.md is now javatools/lsp-compiler.md, matching the other lowercase guides; links in javatools/README.md, docs/errs-error-listeners.md and the guide itself follow. - lang/README.md, lang/lsp-server/README.md, editor-setup.md and plugin/README.md pointed at CLAUDE.md for project rules; they now link AGENTS.md (#composite-build-semantics), which holds them. CLAUDE.md only includes AGENTS.md. Draft #693 and the outside-lang comparison branch still use the old file name; mirror this rename there when they are next synchronized. (cherry picked from commit 590935e)
The DAP placeholder answered as if it were debugging: every breakpoint came back verified, launch and attach succeeded and sent `initialized`, and `threads` invented a main thread. A client that reached it showed set breakpoints that would never be hit and a session waiting on nothing. The Mock adapter, which is also what a Tree-sitter build falls back to when the native library cannot load, inherited the default capability set. The server therefore advertised selection ranges, signature help, semantic tokens, workspace symbols, code lenses, on-type formatting and linked editing, all of which only reach the empty `[NOT IMPLEMENTED]` defaults in AbstractAdapter. An editor treats an advertised feature that answers empty as working with nothing to show. Changes: - XtcDebugServer is an honest placeholder. Breakpoints are reported unverified with the reason (`NOT_AVAILABLE`), launch and attach fail with RequestFailed and that reason, there are no threads, and initialize advertises only `supportsConfigurationDoneRequest`. The other requests stay accepted no-ops. - MockAdapter overrides `capabilities` with what it implements: hover, completion, definition, references, document symbols, highlights, folding, rename, code actions, document links and the shared full/range formatting. The server already gates every provider on that set. - dap-server gets a JUnit test task; XtcDebugServerTest checks unverified breakpoints, refused launch/attach and the exact advertised capabilities on the wire. - XtcLanguageServerTest's capability audit asserted the stubbed providers for the mock backend. It now asserts the mock's real set and, in a separate test, that the seven stubbed providers are absent. The on-type formatting trigger characters, previously checked only there, are now checked in compiler mode (XdkLanguageServerTest), which does implement on-type formatting. Docs: the VS Code README Debugging section says what the placeholder answers; the DAP plan status and Phase 0 heading no longer claim the wiring is complete while IntelliJ registration is disabled; playbook V10/V11 no longer say F5 stops at breakpoints (they now match X285); plan-embedded-execution marks the placeholder half of R6 done; plan-ide-integration and the integration plan describe the placeholder instead of verified breakpoints; the lsp-server README lists the mock's fallback role and no longer claims it has workspace symbols. Validation: - :lang:lsp-server:test full suite: 2293 tests in 309 classes, 0 failures, 2 existing skips (JUnit XML, fresh timestamps) - :lang:dap-server:test: 3 tests, 0 failures Limits: - VS Code never starts the DAP server in practice: the debug configuration provider runs the module and returns undefined. The placeholder matters for any client or configuration that bypasses it. - The Tree-sitter-to-Mock fallback is still reported only in the server log, not to the user. - Tree-sitter keeps the default capability set: it overrides every feature in it. Whether each of those answers well is not re-audited here. - Real debugging remains R6 (session service) and R7 (runtime bridge). On #693, XtcDebugServer.kt is taken whole from lagergren/errs: the copies differed only in comment wrapping and one ktlint suppression, from errs' formatting alignment (ad4a117). (cherry picked from commit eba208b)
A backlog sweep of the tracking and planning documents found items still presented as open although later sections, the code or GitHub show them done, superseded or changed. Each was checked against its closing evidence before editing: the later journal section, the code (git grep / git log), or `gh pr view`. Dated journal entries keep their history: an unchecked box that later work closed is ticked with a "Done later" pointer, and a dated statement that still read as current gets a short "Later:" or "Superseded:" line. Current-status tables and undated status text are updated in place. Integration plan (docs/errs-integration-plan.md): - Ticked, with the closing section linked: demo notification cleanup, PLAT2c/L67, PLAT2e, the cursor/header forms (superseded by L57–L59/L64), the native IntelliJ parity checkpoint, the retained heap growth (TransientThreadLocal fix; October 8 growth below 150 KB over 1,800 cycles), the combined gate rerun, the uninterrupted IntelliJ receipt, L62 cross-module/overlapping moves, the support bundle and failure links, and the L63 items the closure implemented within its bounds. - Kept open with what remains: visible Cancel is done but UP16/UP17 and platform acceptance are not; X105 has not recurred but was never diagnosed; mutable captures, inverse substitution, runtime Class/Type values without a source owner and explicit generic qualifiers were moved out of L63 scope and are still unimplemented; dependent/dynamic type shapes are still refused; remote-host acceptance moves to L82. Journals (docs/errs.md, docs/errs-audit.md): - Status table rows 2.2 (highlights do distinguish read/write), 3.5 (partial: cross-file definition/references over the source graph; no persistent index), 3.6 (bounded compiler-only completion and signature help) and 4.2 (final-type checks pinned by TypeInfoFinalCompositionTest; the 70-message survey stays open) now state the current state. - "Later:" pointers for the 121-call recount, positioning, AST2/AST4, the build-model import, the uninterrupted IntelliJ runs, visible Cancel and shared-process windows, and the heap growth. Playbook (lang/doc/manual-test-plan.md): - The heap paragraph no longer calls the October 1 run "the latest" with growth under investigation; it records the fix and the October 6/8 runs. Multi-hour and platform evidence stay open. Visible Cancel pointers added; §14 signature help and §15 document links name the compiler adapter as well as Tree-sitter. PR roadmap (pr-roadmap.md), from gh on 2026-10-16: - #685 was closed unmerged on 2026-10-12, not merged as the roadmap said. #683 was closed unmerged on 2026-10-15. #686, #687, #688 and #689 are merged; #687 merged as df29154 with four files, not the six or three the roadmap gave in two places. #693 is open and no longer a draft. Plans and guides (lang/doc/plans/*, lang/README.md, docs/errs-upstream-issues.md): - Dated status notes: the naming audit is done (no user-facing "XTC" in the five listed IntelliJ files; only KDoc, log messages and the icon path), per-file Tree-sitter re-indexing, the obsolete conditional Tree-sitter build, format on save, the VS Code plan (implemented except runtime debugging and Marketplace publishing), VS Code commands, compiler doc generation, workspace-wide hierarchy and editor workspace discovery in IntelliJ, compiler-backed semantics. - formatting-plan: the manual checklist points to §13a and OnTypeFormattingTest; the `)` outdent, `->` indent and `/**` skeleton items are struck through with their tests. - Upstream register: UP23 and UP24 rows added from the doc's own sections; the UP01–UP29 rows were split across three fragments (blank lines and a repeated header made two of them render as plain text) and are one table again. A stray "j" before conditional-build.md's title is removed. Validation: documentation only. All 57 new relative links and anchors resolve (checked by script against each target's headings); git diff --check is clean. PR states were read with gh. Limits: several closing pointers cite commit hashes from before the 2026-10-05 rebase, following the documents' existing convention; those commits live on backup/errs-pre-master-rebase-20261005, not in this branch's history. The L63 consolidated list still ticks some forms (runtime Class/Type receivers, capture preservation) more broadly than its closure table supports; its own caveat limits the ticks to the closure's supported forms, so it is left as written. On #693 the plan documents stay as on master, so the plugin-stability-followups row in the plans index is not updated. (cherry picked from commit b1b4ea0)
The javatools test for EmbeddingSupport.runMethod and console input (from 5a14da2 and 82b6ba5), the same file as in the runtime pull request that carries those changes to master and in #693. It runs real modules against the installed XDK and is skipped without it: entry method selection (InterpreterControl.entryArguments) and its refusals, exact arguments including non-ASCII text, readLine with and without console input, and a missing entry method. Runs use a temporary root directory. Validation: the class passes here, 5 tests, none skipped (fresh JUnit XML). On the runtime branch, changing runMethod to drop the console input makes the console test fail.
docs/errs-integration-plan.md: - The 2026-10-15 embedded build/run and hardening sections and the 2026-10-16 section say their commits were mirrored into #693 on 2026-10-16, instead of "not mirrored". - The 2026-10-16 map gains e4f357f (VS Code build mode command and status bar) and 843bc12 (EmbeddingRunMethodTest). - New section "#693 synchronization and the runtime pull request (2026-10-16)": #693 moved from a37d5dd to 4abcfbb; what was left out and why (tracking files, the reverted pair and their revert); how the plan documents, XtcDebugServer.kt and the lowercase renames were handled; the two #693-only commits; a table mapping all 41 #693 commits to the commits here; the #693 receipts (all suites, both full native catalogs, and the toggle); the runtime branch lagergren/embedded-run-runtime (9a38204, b99159a, 90334a1), how it differs from this branch on master, its receipts, and open items to open its pull request and to rebase #693 once it merges. pr-roadmap.md: a row for e4f357f and 843bc12, a note on the 2026-10-16 synchronization, and the runtime-execution paragraph updated for its branch and #693 carrying the same changes. Validation: documentation only. Commit identifiers in the map come from the cherry-pick lines on #693's branch; run identifiers and counts were read from each run's results.json and JUnit XML. The pull request itself is not opened yet: the auto-mode permission check refused gh pr create.
…ce pull, for a change that no watcher reported X27 failed in VS Code's full catalog (run-PP9aKZ): Bad.x's error stayed after its deletion, because VS Code's watcher reported the new folder X27 and nothing in it. This is VS Code's gap, filed as microsoft/vscode#350854 (UP94). A reproduction in the extension host (VS Code 1.140.0, the container's aarch64 Linux, 8 CPUs; extension-tests/ run-fx65ee) listened with createFileSystemWatcher('**/*'), as the language client's registration of the server's watcher does. It made a folder as X27 did (mkdir -p <case>/Project and three files), then deleted one, and waited for a sentinel file's event after each step. Results: - Quietly: 2 of 60 lost Project with everything in it, the later deletion included. - Under 8 busy loops on the 8 CPUs: 10 of 30. - Made outside and moved in: 5 of 5. - Made one folder at a time, each once its event came: 0 of 5. The cause is @parcel/watcher's inotify backend, which adds a watch for a new folder and does not read it, so a subfolder made before the watch never gets one. The graph's own sources are read again at each pull (reportedDiagnostics), but an open module outside the graph, as each playbook case's module is beside the others of its name, kept the analysis its document's open made. Its closed members' errors stayed in every pull. Now a workspace pull first checks each such module against what its analysis read (XdkAdapter.unwatchedChanges). Where its root or its member folder differs, the pull takes that as a watcher's event of it (refreshForFile) and waits for the new analysis. How the check reads: - It lists and reads the module as the analysis did. XdkFileChanges.changedSources uses XdkSources.sourceFiles, the listing that XdkSources.capture now shares, and XdkSources.read, as capture reads. That listing doesn't follow links, uses canonical paths, keeps only regular .x files and folders in the member folder, and counts the open documents' files there, whether or not their files exist. The read drops a byte order mark. An analysis that read the sources is never found changed. The first version listed them as a watcher event's check does, which a review found never settles: an open member deleted in VS Code's Explorer keeps its tab, with no didClose, and every pull then refreshed and compiled the module again. - A change it found is not found again until the module's analysis has read other sources, so no difference that an analysis doesn't take in asks for a refresh at every pull. - One XdkFileChanges.ReadBudget covers all the modules of a pull: 512 entries and 1 MB in all. Each pull starts at another module. - It skips a module whose analysis is running, and reads nothing, the open documents' paths included, while no module outside the graph is open. - It runs on the message thread, as a watcher's event does. The pull must start after the refresh, and in order with the documents' changes, so moving it off the thread would need the pull's start moved too. XdkFileChanges.unchanged, the watcher event's check, is as it was. Cost per pull, measured on this Mac, the guard called 2000 times. Two runs: - Root and 2 members: 0.28 ms of a 2.9 ms pull. - 102 members of 1.5 KB: 8.0 ms of 36 ms. - 402 members: 33 ms of 119 ms. - 602 members (past the budget, so no change is reported): 13 ms of 139 ms. These were taken under a load average of about 80. The first version, under less load, took 0.3, 3.7, 13.5 and 1.8 ms. Most of the difference is the canonical path of each entry, which matching capture's listing needs. VS Code's client pulls about every 2 s while idle. The alternative, not taken, was to remember each folder reported made and recheck its subtree. It keeps state, reads every subtree made in a session, build outputs too, and misses a module whose folder was never reported. Validation: - XdkPullDiagnosticsTest, "a closed member of a module outside the graph goes from the workspace's pull once deleted, though no watcher reports it", follows run-PP9aKZ's order: the folder's event only, the root opened, Bad.x deleted with no event. With the guard's call removed it fails at the last pull, whose report of Bad.x is unchanged. It shares project() with the test before it. - XdkPullDiagnosticsTest, "an open member deleted with no watcher's event starts no compile or revision at each workspace pull". The module has the open member that was deleted and a closed member with a byte order mark. Two pulls after the deletion must submit no compile and leave the diagnostics' revision (diagnosticRevisions) as it was. Then a change found once is not found again before an analysis reads it. It fails on the first version, whose pulls each submitted a compile, and with a read that keeps the mark. - On errs 7d8371a: XdkPullDiagnosticsTest (32), XdkFileChangesTest (7), XdkReleaseServerTest (97), FileEventDuringAnalysisTest (1) and XdkCursorWatchTest (2), with -PlspTests="!slow & !heavy": 0 failures, 0 skipped. - :lang:spotlessCheck, :lang:detekt and the compiles are clean. The NestedBlockDepth baseline entry of capture went with its walk, which sourceFiles has, flattened. - Container, VS Code X26-X28: run-r48BIk, all passed, on this commit (the watcher was in time; the guard did not fire). Before the byte order mark's read and the rebase onto 7d8371a: run-RYVtfc, all passed; the guard fired once in X27, before the watcher's event of Bad.x came. On the first version: run-fjrQSd, also passed. Limits: - Only the workspace pull rechecks. LSP4IJ 0.30.1 pulls the workspace once until a refresh, so IntelliJ gains little. Its watcher passed X27. - A module past the budget keeps a missed change until a watcher's event or an edit. - VS Code's watcher still misses the folder's later changes for the server's other uses, such as rediscovery of a module added in such a folder (microsoft/vscode#350854).
… the rename dialog's error text in X58 The probe Refusals (9606e85) lets a refactoring's wait fail at once with the IDE's words. Until now only its editor-hint path had fired, in X352 (run-4749195041951787387). No case had the IDE refuse a move or a file's rename through the "Ecstasy Refactoring" notification. None had the rename dialog refuse with its error text either. Each path is now driven in an existing case, so the corpus gains no case: - X128, the variant with uncompiledSource (scenarios.json; VS Code's X128 doesn't read it): App.x gets that text, a syntax error, in its editor, and the case waits for its error. It then renames Box.x from the project view with the XTC file rename. The server refuses the unproven rename, and the plugin's notification says "Rename Box.x failed: This rename can't be proven while App does not compile: fix the errors, then rename again". The wait for the rename's edit fails at once with "the IDE refused it: Rename Box.x failed: ...", which the case checks. It then checks that Box.x stayed, expires the notification's balloon (Refusals.expire, expireRefusals), mends App.x and renames as before. - X58, after its invalid names: the Rename dialog is opened with the new name, and the source is changed while it is open, through rename()'s new whileOpen. Refactor then makes the dialog show "Source changed; cancel and invoke Rename again." and stay open. The wait for its close fails at once with exactly those words. cancelRenameDialog closes it, waiting by withinOrFail. The case checks that the rename changed nothing, puts the source back and renames as before. Both refusals are forced through inputs, a module that does not compile and a source changed under the dialog. Neither XtcRenameEdit nor the server's rename answers changed. The first container run found a harness bug in the error-text path (run-9495072460991611377). X58 failed with "the IDE refused it: Source changed; cancel and ". The dialog's error text wraps, and getAllTexts gives a text for each line, of which the wait took the first. fillRenameDialog now joins, in order, the texts that were not shown before Refactor (said). It takes them only once two reads in a row agree (steady), so a read while the dialog lays out the text's lines can't take it short. Validation: - Container, IntelliJ X58 and X128 on this commit, over errs 7d8371a (renames proven by the text's hash): run-2596836560129766996, both passed, and no ERROR in the IDE log. - Before that rebase: run-18305743512258529296, X58 with its refusal step three times in a row and X128, both passed. The repeat was a change for that run only, as the case selector runs a case once. - On the version before the review's changes: run-9729668096903044489, both passed; its IDE log has the notification's text and no ERROR. - :lang:intellij-plugin:compileIntegrationTestKotlin and compilePlaybookProbeKotlin with no warnings; :lang:spotlessCheck and :lang:detekt clean. Limits: - The notification path is driven by a file rename. A move goes through the same XtcFileOperations.submit and is not driven separately.
…'s own, and never follow a link deleting them On Linux, where /tmp is every user's, another user could take over or delete the server's temporary directories, whose names anyone can predict. XdkLibraries wrote the bundled libraries for `xtc test`'s -L to $java.io.tmpdir/xtc-lsp-xdk-<16 hex digits of the bundle's fingerprint> and reused it whenever its .complete file was there, whoever owned it: another user's directory at that name, with a .complete and module files of theirs, had every embedded test run load their modules as the user. Its deletes used File.deleteRecursively(), and ProcessDirectories.delete File.walkBottomUp(), whose walks test File.isDirectory and so follow a link to a directory: a directory at such a name with a link to the user's home had the server delete the user's files (and setWritable(true) followed a link to a file). Another user's directory or lock file at those names, or at the guard files .xtc-lsp-xdk-lock, .xtc-library-sources-lock and .xtc-attached-sources-lock, locked the user out. And a check made once is not enough: a server runs for weeks (a VS Code Remote server), while systemd-tmpfiles or tmpwatch age out its untouched files and then its empty root, which another user can then make again, with modules of theirs at the bundle's name, or a link where the server writes its library source copies. macOS and Windows give each user a temporary directory of their own; the fix works on all three. Audit: SessionLock opens its lock files with NOFOLLOW_LINKS (hold, share, guard, held) and unheld lists only directories, not links, of the same owner, and deletes nothing; what it needed was for its lock files to be out of the shared directory, where another user's file at a guard's name made the guard fail open (guard told its block it held nothing) and at a lock's name made hold and share fail. ProcessDirectories had the same predictable guard files and the link-following delete, and the copies' and snapshots' writers (XdkLibrarySources, XdkAttachedSources) wrote with createDirectories and writeString, which follow links. The tree-sitter libraries are Files.createTempFile files (random names, created exclusively, for the owner alone), which no one can make first; they stay. Fix: - UserTemporary (org.xvm.lsp.util), one root per user for every temporary directory the server makes and their lock files: <base>/xtc-lsp-<user.name>, the name's characters outside [A-Za-z0-9._-] as underscores. The base (UserTemporary.base) is, on Linux, $XDG_RUNTIME_DIR, the user's alone and never aged out, else ~/.cache where the user has one, each where it is a directory of the user's that no one else can write; java.io.tmpdir otherwise, the only base on macOS and Windows. A base that anyone can write without the sticky bit (unix:mode o+w, no 01000), as a shared NFS scratch, is refused, as others could replace what is in it. - The root is made rwx------ (an owner-only ACL where there are ACLs but no POSIX permissions, as on Windows), and checked at each root(): a directory, not a link (attributes read without following links; a Windows junction counts as one), owned by the process's user (Files.getOwner, compared with the owner of a file the process makes), that its group and others cannot write, by its mode, whose group bits are a Linux ACL's mask, or else by its ACL's entries. Otherwise the server logs why and uses a fresh private directory, Files.createTempDirectory(base, "xtc-lsp-<user>-"), from then on, which it deletes as its JVM exits; a hook it cannot add, as the JVM is exiting, is skipped. - delete(path) deletes a file or a tree by Files.walkFileTree without FOLLOW_LINKS, a link deleted itself, a regular file made writable first for Windows; it refuses (logs, returns false) anything outside the root in use by the real path of its folder, the root itself, anything another user owns, and anything while no root is in use, which a delete never makes. - write(path, bytes) writes a new file in the root as it is then: the folders on its way made one at a time, none a link, the file CREATE_NEW and NOFOLLOW_LINKS; a link or file at its name or a link on its way throws FileAlreadyExistsException, a path outside the root, as one of a root no longer used, IllegalStateException. - XdkLibraries.directory checks the bundle's directory again at each use, as at each `xtc test` launch (TestProcess.command), instead of once in a lazy: bundled(UserTemporary) takes the root once, and under its guard uses the directory only where its entries are the bundle's files and nothing else, each a regular file whose SHA-256 is that file's revision in the bundle (the files map, by name, from which revisions now comes); otherwise it writes it again, staged beside it and moved in, and refuses one it cannot make right. .complete is gone. Its shared lock is taken once for each directory, and again where its lock file is gone. Its deletes of other bundles' unheld directories and their locks go through UserTemporary.delete. - XdkLibrarySources' copies and resource files and XdkAttachedSources' snapshots are written by UserTemporary.write; ProcessDirectories makes its directories and guard files in the root, recognizes another server's copies (holder) only in the canonical root, none without a root, and deletes through UserTemporary.delete. - Otherwise as before: the root and the bundle's directory are shared by the user's servers and kept for the next one; a process's own directories go when it exits, a killed one's with the next server of the kind. - lang/doc/configuration.md: the temporary root's row, and the rows of the directories in it. Tests, each fails without its check (fresh JUnit XML, every run below; the cases that need links or POSIX permissions assume them, as a Windows run has neither): - UserTemporaryTest (new, 8): a link to a directory of the user's alone, a file, and another user's directory (by an injected ownership check) at the root's name are not used; a group-writable root in use is left for the process's own, which stays once the shared one is right again; an others-writable root is not used, one that others can only read is; a temporary directory that anyone can write without the sticky bit has no root, and with it has one; the user's name keeps only file name characters; the real ownership check takes the process's user for the owner of a file it makes and not / where another user owns it; on Linux the base is the runtime directory, else the cache, else java.io.tmpdir, each passed over when others can write it, it is missing or relative; a delete leaves what links in the tree name (a folder and a file outside the root) with a read-only file in the tree gone, deletes a link itself, and refuses outside the root, through a folder that links outside it, the root and another user's directory; a write makes its folders, and refuses a link at its name, a link on its way, a path outside the root, and a folder of a root that another user made again. - ProcessDirectoriesTest: a directory's links to a folder and a file outside the root survive its delete, which takes its lock file too; the cases make their directories in the root under kinds of this JVM's own, as the root is shared by every test JVM of the user's. - XdkLibrariesTest: a bundled module's file with other content, a module more, a module less, a module that is a link to a file of its very bytes, a folder at a module's name and a folder more are written again, not used; and with the root deleted after the directory was used and made again with other modules, the next use writes it again, and where another user made it again, the next use is in the process's own root. - LibraryCopiesCleanupTest (its server without $XDG_RUNTIME_DIR, so in its java.io.tmpdir), XdkPullDiagnosticsTest and ProcessDirectoriesTest's holder and guard cases look in the root. Validation: - Without the checks, the cases fail. First version: with the walk following links, the root check following the link, no permission check and holds() true for any directory, UserTemporaryTest's then 3 cases, ProcessDirectoriesTest's delete case and XdkLibrariesTest's case failed; without the root's owner check and the delete's in-root check, the foreign root and the delete outside the root failed; without the delete's owner check, its delete of another user's directory failed. Review fixes: with the directory computed once per process, a write by createDirectories and plain Files.write, no sticky check, and holds() following links, both XdkLibrariesTest cases, the sticky case and the write case failed; with holds() following links alone, no in-root check of a write and the process's own root not kept, the module that is a link, the write outside the root, and the shared root taken back failed. - macOS gate, with the fixes (--rerun-tasks --no-build-cache, -PlspTests=all, results deleted first): UserTemporaryTest 8, ProcessDirectoriesTest 5, ServerLogsTest 8, XdkLibrariesTest 5, XdkPullDiagnosticsTest 32, CommandLineTestsTest 2, EmbeddedTestRunsTest 11, XdkLibrarySourcesTest 1, XdkLibraryDocumentsTest 7, XdkLibrarySymbolsTest 4, LibraryContentProtocolTest 6, XdkSourceLinksTest 4, XdkDependencyTest 14, XdkHoverDocumentationTest 3, and in compilerStdioTest LibraryCopiesCleanupTest 2: 112 tests, no failures, none skipped. :lang:spotlessCheck passes; :lang:detekt reports no findings. - Linux, in the playbook container (aarch64, as its user playbook, uid 1001, not root, so the real owner check met a root-owned /): playbook.sh gradle :lang:lsp-server:test with UserTemporaryTest 8, ProcessDirectoriesTest 5, XdkLibrariesTest 5 and EmbeddedTestRunsTest 11 (--rerun-tasks --no-build-cache, -PlspTests=all; JUnit XML read from the work volume): 29 tests, no failures, none skipped (out/gradle-20261128-174811.log). X344, a module's tests run embedded by `xtc test` with the bundle's directory as -L, passed in IntelliJ (run-16714976571227627132) and in VS Code (run-RuGX6t), with no refusal or fallback in either server's log. Limits: - Directories that servers before this one left in java.io.tmpdir itself (xtc-lsp-xdk-*, xtc-library-sources-*, xtc-attached-sources-* and their locks) are no longer deleted by any server, as a delete in the shared directory is what this keeps out; they are removed once by hand. - A server whose root is refused keeps its directories in a root of its own, which no other server finds: a killed one leaves it behind, and a server of the same build writes the bundle again. Its library source copies and snapshots, made in the root it had, are refused from then on. - Between the check of the bundle's directory and `xtc test`'s read of it, milliseconds, nothing but a cleaner can change the root, which is the user's and no one else's to write. - $XDG_RUNTIME_DIR goes when the user's last session ends without lingering; a server that outlives it (a VS Code Remote server after a disconnect) has no root until the next login makes it again. - Ownership is tested by an injected check and the real one only against /; Windows has no POSIX permissions, so the ACL and junction rules, written from NIO's documentation, are untested; macOS ACLs are not read, where the user's own temporary directory keeps others out anyway. - javatools' DirRepository keeps its module index cache in <java.io.tmpdir>/xvm-dir-repository, shared the same way; that is javatools, not the server, and is not changed here.
…ectory's guard, and fail what needed it with why SessionLock.guard took a kind's guard with FileChannel.lock(), which waits with no limit: a server that holds the guard and is suspended (in a debugger, or by SIGSTOP) while it makes or deletes a directory of the kind hung every other server that came to it, forever. Its callers are XdkLibraries.bundled, the bundled libraries' directory that each embedded test run's `xtc test` takes, and ProcessDirectories.create, the library source copies' and the attached sources' folders. Ported from lagergren/own-xdk-embedded (the own-XDK mode stays out, deferred to #822). Fix: - SessionLock.guard(file, limit, waiting, notice = 10 s, action), the only guard now (the unbounded one is gone). A call waits at most its limit in all: for this process's other threads at the guard, by a ReentrantLock per file taken with tryLock(limit), and for another process's hold, which it tries every 100 ms from the same start. It tells waiting how long it has waited at each notice, and past the limit fails with an IOException naming the file ("<file> stayed locked by another process for more than 120 s"). SessionLock.LIMIT is 2 minutes: a server holds a guard for the moments it makes or deletes a directory, so only a stopped holder reaches it. The waits are logged by the callers, as SessionLock runs while logback starts and does not log. - A guard that another process held past a wait's limit is remembered (SessionLock.stuck): while that process holds it, each later call, and each one that waited beside it for this process's thread, tries it once and fails at once ("<file> is still locked by another process, which held it past the limit of an earlier wait"), and the first call that takes it forgets it. So requests that queue on one folder, as Go to Definition requests on the library copies' lazy folder, fail together, not 2, 4 and 6 minutes in. It is forgotten on the first take rather than after a time, as the lock file does not change when its holder lets go, and a window of time would bring the 2-minute wait back every so often while the holder stays suspended. - An interrupt ends a wait, in the sleep, the thread lock or the lock attempt (ClosedByInterruptException, which before made the call run unguarded), with an InterruptedIOException naming the file, and the interrupt stays set. - XdkLibraries.bundled(temporary, limit = LIMIT) and ProcessDirectories.create(prefix, limit = LIMIT) log each notice through the server's logger ("waiting N s for another server to ..."). - At the limit: a test run's launch fails with why ("The tests did not start: <file> stayed locked ..."), before its debugger socket is opened, and no run is left held; the server goes on, and the next launch tries again. The launch takes the directory on a thread of its own (EmbeddedRuns.bundledLibraries, "xtc-test-libraries"), not on the compiler queue's thread, which ended the run's build, nor the one that took a debug session's configuration, so neither analysis nor the client's messages wait with it. EmbeddedRuns takes the directory from a `libraries` provider (XdkLibraries.directory unless a test replaces it), and TestProcess.command takes it as a parameter. A library source copy that makes the copies' folder fails with the IOException, as where the root cannot be written, and the lazy folder is made again at the next use. - A library whose attached sources cannot be read, as when their snapshots' folder cannot be made, is taken without them, with a warning in the log (CompilerLibraries.attached): the sources serve navigation only. Before, CompilerLibraries.resolve made the IOException an IllegalArgumentException, which failed initialize, or had a configuration change keep the previous configuration. SessionLock.unshare was not ported: no ported caller needs it. Tests (each against the fault it catches): - ProcessDirectoriesTest "a guard another process holds ends a wait at its limit or an interrupt, with why, then at once beside it and after it", with a SessionOwner process holding the guard: an interrupted wait fails with an InterruptedIOException naming the file, the interrupt still set (an escaping InterruptedException, or a cleared flag); a 1 s wait fails with the message, its waits heard, sorted, the last past the limit (a wait that never ends, ends early, or is never told); a wait beside it, with a limit of a day, waits for that thread and then fails at once, without a wait of its own (a limit per attempt rather than per call); create fails at once after it (a later use that waits the limit again); once the process has exited, the guard is taken at once and the directory made (a guard that stays failed). The case of two threads at a held guard now finds the waiting thread at ReentrantLock.tryLock. - XdkLibrariesTest "the bundled libraries' directory fails with why while another server keeps its guard past the limit, then is written": the same for the bundles' guard file. - EmbeddedTestRunsTest "a run of tests whose bundled libraries another server keeps past the limit fails with why, and the next one runs": through the real guard of a temporary root of its own, held by a SessionOwner process, with a 1 s limit: the run request fails with the reason, the wait was on the xtc-test-libraries thread, no run stays tracked and no exit comes, and once the process lets go the next run's test runs and passes (a launch that hangs, waits on the compiler queue, leaks the run, or takes the server down). - CompilerLibrariesTest "a library whose attached sources cannot be read is taken without them, as they serve navigation only": an attached source without read permission leaves the library without declarations and documents, rather than failing its configuration. Its setup is shared with the attachment case. - SessionOwner.start and .guarding replace the copies of its process start in ProcessDirectoriesTest and ServerLogsTest. - No timing beyond the limits: the only waits are the 1 s limits themselves. Validation: ServerLogsTest 8, ProcessDirectoriesTest 6, XdkLibrariesTest 6, XdkPullDiagnosticsTest 32, CompilerLibrariesTest 4, EmbeddedTestRunsTest 12 (-PlspTests='!heavy'), 0 failures, 0 skipped, from the JUnit XML; this commit's tree compiles alone; :lang:spotlessCheck and :lang:detekt clean. Container (Linux, on Xvfb), with the next commit: X344, an embedded `xtc test` that takes the bundled libraries' directory, and X283 passed in IntelliJ (run-17290758783627409920) and VS Code (run-EdJwlC). Limits: on a hung NFS mount (the temporary root's base `~/.cache` on an NFS home, on Linux without $XDG_RUNTIME_DIR), FileChannel.open and tryLock themselves block with no limit. A stop during a test run's wait for the libraries takes effect once the wait ends. The poll is 100 ms.
…s, which stops the compile and writes nothing
A Stop while a run's module built only set the waiting run's `stopped` (EmbeddedRuns.stop): the build
ran to its end, holding the compiler queue, and the run's request answered only then, with the
program kept from starting. A long or hung compile kept both until it ended. And IntelliJ did not
even ask: EmbeddedRunProcessHandler held a Stop back until the run request answered ("Stopping when
the build finishes..."), which it does once the program starts, so a Stop during the build let the
compile finish and the program start before it was stopped. Ported from
lagergren/own-xdk-embedded, the bundled build's part only; its own-XDK toolchain code stays out
(#822).
Fix:
- WaitingInput keeps the run's build future (`build`). EmbeddedRuns.stop cancels it, outside the
input lock, once it has marked the run stopped; a stop that comes before the build was asked for
has launch cancel it as soon as it is. The canceled build's end goes to the run (stoppedBuild):
the request answers with the run's ID and a canceled build, and the run exits as "Stopped before
the program started.", as before. Any other failure of the build fails the request, as before.
- In process, the cancellation is the compiler queue's: XdkAdapter.buildAsync removes a queued
build from the queue, and a running build's compile checks `result.isCancelled` through
ErrorListener.cancellable and between the closure's modules, and stops; a canceled compile is not
cached for reuse (compileInClosure checks before it records), and the build writes nothing
(XdkBuild.cancelled). A cancel that comes after the closure compiled lets XdkBuild.write finish
from that whole compile: CompletableFuture.cancel interrupts no thread, so no file is half
written. No change was needed there.
- IntelliJ: from the run request on, the server holds the run, so a Stop asks it at once, and once
(stopAsked); a Stop while the request is about to go out has the request, once sent, ask it. The
hold-back until the program starts, and its message, are gone. VS Code (its run terminal's close,
the test explorer) and DAP's terminate already asked at once.
Tests:
- EmbeddedExecutionTest "a stop while a run's module compiles cancels the build, whose compile
stops and writes nothing, and its request and exit come": a stand-in compileTree whose first
compile of the module waits until the compiler's listener asks it to abort, then compiles with
that listener, as the compiler stops at its first check. The stop cancels it: the request answers
with the run's ID and build.cancelled, the exit comes with STOPPED_BEFORE_START and no exit code,
no run stays tracked, the compile saw the abort, and once the canceled job has ended its artifact
is not on disk; the next build compiles the module again (not reused) and writes it. Without the
stop's cancel, it fails ("hung waiting for ... CompletableFuture"), checked by running it so.
- EmbeddedExecutionTest "a stop that comes before a run's build is asked for cancels the build once
it is, and its request and exit come": an editor compile's debounce holds the adapter's lock,
which buildAsync takes, so the run is held but its build not yet asked for when the stop comes;
once let go, the build, whose compile never ends on its own, is canceled, and the request and the
exit come as above. Without launch's cancel, it fails ("hung waiting for the stop's cancellation
reaches the compile"), checked by running it so. Both share the stuck-compile adapter
(stuckCompiling).
- The plugin's EmbeddedExecutionTest "stop during the build asks the server at once, once, and the
canceled build's exit ends the run": with the run request unanswered, the Stop reaches the server
at once, the canceled build's exit ends the run, and the server is asked once. With the old
hold-back, it fails ("hung waiting for []"), checked by running it so.
Validation: EmbeddedExecutionTest 68 (-PlspTests='!heavy'; the soak is heavy), EmbeddedTestRunsTest
12, ProtocolWireFormatTest 4, the plugin's EmbeddedExecutionTest 16, 0 failures, 0 skipped, from the
JUnit XML; :lang:spotlessCheck and :lang:detekt clean. Container (Linux, on Xvfb), at this commit: X283 (an embedded
run stopped, rerun, and the next program run) and X344 (an embedded test run) passed in IntelliJ
(run-17290758783627409920) and VS Code (run-EdJwlC).
Limits: the stop's thread runs the canceled build's end, the run's exit event included, as it is the
thread that cancels; the build's job itself ends at the compiler's next check. No catalog case stops
a run while it builds.
…hat it shows, on the playbook's record, and no server work for a wait only the window can satisfy The tour's waits went on while Activity.inProgress named anything: a debug session that ran, not paused, and a shell or process task that had not ended counted as under way however silent they were, so a wait whose condition never came while a debugged program waited for input, or a Gradle task hung, ran to the hang's bound (an embedded run counts only while it prints, since b79a852). And the server's requests and compiles, and what they last did, counted for every wait, also one that only the window can satisfy, as a widget that takes the keyboard, which the server's background work, as the requests that the window's own drawing makes, kept going. The playbook's waits had answered most of this in their own record (Happenings, uiWait.ts), which the tour's Activity copied in part, and the playbook's reviews of the held fix found four of its rules missing in the tour: an unanswered launch or attach counted as under way for good, VS Code's requests to the debug adapter counted for every later step, a condition that hung gave no report until the hang's bound, and a process that computed silently counted as nothing. The tour's Activity now reads the playbook's record, which it disposes with itself, and keeps only what is its own: the server's requests and compiles from its traces, when the last of them happened, the files it expects the server to hear of, and the wait only the window can satisfy. What else counts is the record's: the workbench's events (editors, tabs, documents' opens, closes and edits, but a log's, the diagnostics, the settings), the workspace's files, debug sessions that start or end and the adapter's events, the program's output among them, tasks and their processes that start or end, terminals, a process task's terminal output without Gradle's clock (withoutClock, terminal.ts), the embedded builds' and runs' output, the tests' starts and results, the language client's states and a starting server's growth; and the tour adds the tests' listing. A response of the adapter, which ends a request, no longer counts as something that happened, as a request of VS Code's did not either apart from being under way; a running session or task is no work of itself. The record reads the terminal through the tour's own page: taskTerminal takes a page, and TourUi.terminalText shares its rows' read (terminalRows). - A launch or an attach that the adapter has not answered counts not at all, as in the playbook (PROGRAM_REQUESTS): it waits for its program, as a Gradle task's, which counts by what the task, the program and the adapter show, and a terminated session's requests are dropped. - Each step (Tour.shot) and check (Tour.verify) runs as a run of its own (runAs, new in wait.ts, which runCase now uses): VS Code's requests to the adapter count for the waits of the step that made them only, and those a step leaves unanswered are logged once as it ends ("left unanswered"), as the playbook reports a case's. - Tour.until waits through tourWait, on waitOn: a condition that has not answered within 2 s is waited for again at the next look and named in the minute's report ("its read, which has not answered for N s"), and such a look decides nothing, so a hung call of the driver's or VS Code's reports every minute instead of keeping silent until the bound. Three looks with nothing under way are final; for a wait's first minute, what the tour did as it began counts, as before; the pace stays 250 ms and the bound HANG_MS. waitWhile and waitOn take a WaitPace for that (hangMs, paceMs, reportMs; waitOn's answerMs moved into it). - A task's process counts while it computes: the record follows each task's process from onDidStartTaskProcess until it has ended (Happenings.follow, which watch, for a case's own processes, now uses), and while a Gradle task runs (gradlew or gradle in its command), the Gradle daemons, its build's, which outlive the client that started them: the processes whose command line runs GradleDaemon, from /proc, but one that this extension host runs under. A followed process computes while it and those under it were busy for at least half the time since the last sample, a second ago or more (busy, processUse): each live thread's growth since then, by its process's and its own ID, of its time on a CPU and, while it got 1% of the interval or more there, of its time waiting for one (schedstat), and the growth of each process's reaped children's time (stat's cutime and cstime). A thread that computes is runnable however loaded the machine is, one that waits is not; one that a CPU quota throttles waits without its CPU and counts as waiting; a thread or child that ends takes nothing of what it used out of the sum. A sample older than two seconds, as one from before a pause of the looks, is only taken again. The first whole-tour run, run-sJx0EW, failed two steps, each with a wait that counted all that came and ended a minute after the last of it, the server's answers and the adapter's event among it, on a race of what the step reads: - "Breakpoints while you edit": the adapter moved the breakpoint (its breakpoint event, line 75), but VS Code (1.140) gives the extension API only the changes that are not the session's, so vscode.debug.breakpoints follows the line only as the editor moves its breakpoint's decoration with the text, which it does only once it has drawn it; the step typed right after the toggle, and the breakpoint stayed at 74 (recorded as UP95). The step now waits until the editor draws the verified breakpoint on that line before it types, as a user sees it first: a glyph on its line, by the line number beside it (TourUi.glyphs), with codicon-debug-breakpoint and no stack frame's class, which the stop's glyph at the deal has, which the editor may still draw for 30 ms; the wait's failure lists the glyphs. - "Errors as you type": the server had the edit and answered its pull, and VS Code showed the popCrd error, but the report's version that the tour reads (current(), lsp-client's record) never reached the edited one. The restore before it had saved CardCollection.x and not waited for the save's watcher event, which came after the step's edit and made the server refresh every file's diagnostics, canceling the edit's pull; one pull followed, whose version the record did not take. In run-7phygd the event came before the edit. Tour.restoreSources now saves the documents after it starts watching for their events, as for the files it writes, and ends once the server has them; a saved file that is not as the fixture has it, as a save participant can leave it, is written as the fixture has it. A failure's state now names the active document's diagnostics report, its version and last pulls. Problems found: the playbook's rule for a process that computes, that its CPU ticks grew at a look, counts an idle JVM. In the container (JDK 25) an idle JVM's ticks grew at 1 of 109 looks in 30 s, under the minute, so a followed Gradle client waiting on its daemon would have kept a wait going to the hour, the very hang the tour's fix removes; its runnable time stayed under 0.1% of the time, a busy loop's 100.8%. The rule is now the busy time's, for the playbook's processes too. processTime read only the main thread's children, which misses a JVM's, started from other threads; processTree, which it and runnableTime share, reads every thread's. And the harness's test "a case's own process counts while it prints, computes and as it ends" passed without checking that the process computed: its wait took any new happening, which the record's first look, noting the client it finds, always gave (it took under 40 ms); it now waits for the process's "computes". Tests, in the harness: tour-activity.test.ts, which leave the window alone and run in the tour's window too: Gradle's progress bar reads without its clock; a wait only the window can satisfy counts none of the server's work, from a trace of the server's; the adapter's requests count for the step that made them until their answers, and what a step left unanswered is reported once and is no work of the next; an unanswered launch or attach counts not at all; a wait whose condition does not answer goes on and says so in its reports until it answers. playbook-window.test.ts, from fed samples and a fed clock: a followed process computes while it is busy half the time, a thread that ends and a child that ended counting, not one that only wakes or that a quota throttles; it is compared a second apart at least, and a sample from before a pause compares nothing; while a Gradle task runs, the Gradle daemons are followed too, not for a task that runs no Gradle, and no longer once it has ended. And with a real ShellExecution task's busy loop, on Linux only (pending elsewhere): a task's process counts while it computes, though its terminal shows nothing new; and a task's terminal that no task runs prints nothing. The harness's records for tests (record, quietWorkbench) moved to harness/records.ts, and the quiet workbench has tasks too. Validated: npmCompile (tsc), eslint src/ and :lang:spotlessCheck pass. In the container, on this tree as 06c71b8bd8: testPlaybookHarness, run-QmiM4H: 38 passing; the tour's Diagnostics and fixes and Debugging sections, run-mxA1VN: 33 steps, 55 checks, 0 failed, 0 skipped; Debugging twice more, run-5R93Nw and run-otJP0O: 25 steps, 42 checks, 0 failed, 0 skipped each; "Errors as you type" and "Breakpoints while you edit" passed in all, and no wait went past a minute; the playbook's cases whose processes the record follows, X303, X336, X337, X349 and X366 (run-Pv1Pp9): all passed. Harness runs on trees with each new rule undone: run-iz68Yf (the condition's answer awaited for the bound, every adapter request counted for every step and a launch's and an attach's too, any growth of a process's time counted, no task process followed, the server's work counted for the window's waits): exactly those 8 tests failed and 28 passed; run-mhX23g (the old rule of the live threads' totals, no second between samples, no daemons followed): exactly the 3 new tests failed and 35 passed. Before the review's fixes, the whole tour, run-vkZI2x: 101 steps, 175 checks, 0 failed, 0 skipped; its first run, run-sJx0EW, failed the two steps above; and testPlaybookHarness, run-ydmCoL: 36 passing. The tour's steps and their order are those of errs (a step waits more, none is added), so lang/intellij-plugin/tour/narration-vscode.md still matches. The rule for a sample from before a pause was not undone in a run: its test's second part, which compares 60% over three seconds without it, shows it by its numbers only. Limits: no run met a hang, so the tour's and the cases' runs show only that the new rules fail no wait that holds; the harness's tests show the rest. A Gradle daemon counts while any Gradle task runs and the daemon computes, also for a build of another client; one that a build starts as it runs is followed as its client's child, and the Gradle test runs, which are processes of the extension's and not tasks, follow no daemon. A tick of /proc's stat is taken as 10 ms (USER_HZ 100). A request made between the steps, as a section's restore or a step's preparation makes, counts for no step, only between them. A condition that hangs while the driver's connection answers now waits, reporting every minute, to the hour, as the playbook's waits do. Why lsp-client's record of the report's version missed the edited version on the one pull after the cancel is not known; the failure's state now shows it. A starting server still counts by any growth of its process's time and log (serverSigns). Process signals are Linux's only. The full playbook was not run on this tree. stopAll's stops still repeat at a 10 s pace, and a step's action, check or undoing keeps its bound of twice the hang's, as before.
…n another XDK builds with Gradle Every build of the XDK has been 0.4.4-SNAPSHOT for two years, so the reason that a folder on another XDK builds and runs with Gradle, "another build of XDK 0.4.4-SNAPSHOT than the bundled one", told no one which build either was. The XTC plugin's model now names the commit and branch that each XDK's javatools.jar was built at (the commit before this one); the server reads them and names both XDKs with them: builds with another build of XDK 0.4.4-SNAPSHOT (9ef548a, lagergren/errs) than the bundled one (c459577, master) builds with XDK 0.5.0 (abc1234567, master), not the bundled XDK 0.4.4 (c459577, master) The commit is shortened to its first ten digits and the branch is given as it is; with only one of them, the parentheses hold that one, and with neither, the message reads as before. A commit that is not a hexadecimal hash, as the "unknown" that javatools' build writes outside git, is not shown. The bundled XDK's come from the build-info.properties of the javatools jar that the server bundles, where XdkLibraries finds the bundled XDK's other facts (XdkLibraries.build); the XDK of the model from its xdk entry's commit and branch (XdkBuildModel.Build, read leniently: a malformed one is left out without a note, as only messages show it). The cases that cannot compare an XDK, one of the build tree or one with a problem, name the bundled XDK's build too. Telling XDKs apart is unchanged: their module files and javatools revision, never the commit, which a build of a tree with uncommitted changes shares with a clean one. X366's expectations in both editors' playbooks name the other XDK's build: the catalog's reason, notices, picker, popup and tooltip are templates of the commit's first ten digits and the branch, which each editor's case reads from this tree's installed javatools.jar, whose build information the other XDK keeps, as the case adds only its marker; a case on an installed XDK that names neither fails and says so. The user guide, configuration.md (with its line references into the files this changes) and the manual test plan's X366 row say what the reason names. Validated: - ./gradlew :lang:lsp-server:test -PlspTests='!slow & !heavy' --tests '*XdkBuildModelTest' --tests '*XdkLibrariesTest' --tests '*XdkProjectServerTest' --tests '*XdkReplacedLibraryTest' --tests '*ProtocolWireFormatTest' --tests '*XdkWorkspaceDiscoveryTest', in a new worktree: passed; JUnit XML: XdkBuildModelTest 13 tests, XdkLibrariesTest 7, XdkProjectServerTest 16, XdkReplacedLibraryTest 5, ProtocolWireFormatTest 4, XdkWorkspaceDiscoveryTest 10, 0 failures, 0 errors, 0 skipped. A new XdkBuildModelTest test reads commit and branch from the model and words them against a given bundled build: both, a commit alone, a branch alone, neither, a commit that is no hash and a malformed branch; and the reason of a folder with the bundled XDK's build. A new XdkLibrariesTest test: the bundled build is what the build-info.properties of the javatools jar that the tests run with names. The existing reason and refusal tests take the bundled XDK's build. - ./gradlew :plugin:validatePlugins :plugin:test --tests '*XtcLspModel*' --tests '*JavatoolsRevision*' spotlessCheck :lang:spotlessCheck :lang:detekt :lang:intellij-plugin:integrationTestClasses :lang:vscode-extension:npmCompile: passed; JavatoolsRevisionTest 3 tests, XtcLspModelTest 8, 0 failures, 0 errors, 0 skipped. - eslint src/test/playbook/execution.ts: passed. - Container, lang/intellij-plugin/container/playbook.sh on this commit's tree, committed as e88f8da3d8 before this message named the runs: playbook X366 (IntelliJ, run-5130098937644669909) and vscode X366 (VS Code, run-F222dD), each passed, the only case selected. IntelliJ's run log has the reason "builds with XDK 0.9.0 (e88f8da3d8, lagergren/xdk-commit), not the bundled XDK 0.4.4-SNAPSHOT (e88f8da3d8, lagergren/xdk-commit)", each XDK's from its javatools, built in the container from the export with XTC_COMMIT and XTC_BRANCH. Limits: - X366 checks the other XDK's build in the reason, notice, picker, popup and tooltip, and of the bundled XDK, as before, only that the text goes on to "not the bundled XDK"; its build is checked by the server tests. - No dirty mark: a build of a tree with uncommitted changes names its commit as a clean one does.
…eps, also before the code's answer has come
EmbeddedExecutionTest's soak ("repeated builds, runs, stops and debug sessions on one worker") failed once on
2026-11-28, on lagergren/own-xdk-embedded, with "one worker served every run: 2": after round 1's debug session that is
terminated while console code runs where it stopped, the worker reported "1 ended runs still tracked", so the server
retired it and the next round got a new worker. The worker counts what a run kept as soon as the run's close returns:
its active runs and inputs, and DebugCommands.held(), the debuggers and the code runs it holds. DebugCommands held a
RunCode's answer, by its request, until that answer completed. The close ends the code (SessionDebugger.terminate ends
the run in progress), and the debugger answers ended code on another thread, with completeAsync on the common pool, so
nothing orders that answer before the worker's count: when the pool runs it late, the count has the ended run's code in
it. The debugger's own count was not the cause, and neither is this the CI close hang of 2026-11-23, which has a cause
of its own (the next commit).
DebugCommands now holds code by its run and its request. remove(id), which the worker calls once the run has ended,
lets go of the run's code with its debugger, whether or not the code's answer has come; the answer, when it comes, is
still sent, and removes only its own entry, so a late one can no longer take a later run's code of the same request
number; and code that starts as the run is let go of is not held. A Cancel names the run and the request, as it already
carried both.
Validated: SessionDebuggerTest's new
theWorkersCommandsHoldNothingOfARunTheyLetGoOfAlsoCodeWhoseAnswerIsStillToCome forces the order: its code runs until
the run is closed, so its answer comes after the commands let go of the run, as a late answer does. On a throwaway copy
of 670e4e8 without the fix it fails, held() 1 where 0 is expected; with the fix it passes. The soak, 20 runs in a row
(-PlspTests=heavy, the first with --rerun-tasks --no-build-cache, then --rerun), part of them with every core busy and a
container run going: 20 passed, each tests=1 failures=0 errors=0 skipped=0. The affected classes, --rerun-tasks
--no-build-cache, from their JUnit XML: SessionDebuggerTest 58 tests, EmbeddedExecutionTest 69 and XtcDebugAgentTest 16
(-PlspTests=all), 0 failures, 0 errors, 0 skipped; :javatools:javadoc and spotlessCheck pass.
Limits: the soak was not run here without the fix, and its failure was not reproduced; the cause is shown by the code
and the forced order. The 20 passing runs show the fix breaks nothing, not that the race is gone, which only the forced
order shows.
…lock, alone in the debugger, so a close ends SessionDebuggerTest's anotherServicesWaitingFiberHasItsVariablesAndStandsStillAndAStepEndsInTheSteppedFiber failed once in CI (run 45245467896, #693 at 89870a4) at Await.run(control::close), after a step over and resume(): the close hung, the watchdog finding a minute in which nothing used CPU. The run kept no dumps, and the failure had not been reproduced. Reproduced on a throwaway copy of 670e4e8: the test's steps (the stop at line 16, the spinner's reads, the step over, resume() and the close) repeated in one JVM, with the runtime's pool at four threads, as on CI's four cores, and every core busy, hung in the round between 150 and 199 of 300: "nothing used CPU for 60 s (368 ms in this JVM ...)". The close waited at InterpreterControl.close:281, for the run's completion; the close watcher's print had the program's container Terminated and the runner's Task waiting in start() for its completion; the ecstasy:LocalClock timer was alive, with no alarm pending. The runtime had printed: Service "Task" ... Unhandled exception: Exception: Service terminated: LocalClock, at temporal.LocalClock.now.get(), called from Task.start().endWhenIdle (runner.x:317). The cause: a close stops the program for good (SessionDebugger.terminate()) before it replaces the debugger. While a program's services are still at work after run() has returned, as the spinner is, the runner's endWhenIdle polls the program's container every 10 ms, asking the clock for the time, until it has nothing left to do. The clock is a service of the native container, whose code, _native's LocalClock.x, has lines, and the debugger took every frame outside the host's container, the runner's, for the program's: a poll between the terminate and the replacement had its call to the clock ended at a line, as the program's fibers are, with "Service terminated: LocalClock". endWhenIdle threw, so it neither ended the task nor polled again, and the close waited for the task's completion for good, with nothing running. The window is the few instructions between the terminate and the replacement, which a poll every 10 ms rarely meets. The fix: a frame of a service of the native container is the host's, which the debugger leaves alone, when the fibers that called it, through such services, began in the host's container; a program's own calls into those services stay the program's, to stop or step in as before. Validated: SessionDebuggerTest's new theHostsCallsToTheRuntimesClockGoOnWhileTheProgramIsStoppedForGood forces the order: run() returns while a Reader service waits for console input, so the runner polls; the test stops the program for good, as a close does first, and holds that window open; it counts the runner's alarms on the clock's Java timer, which it wraps for the test, and asks for two polls after the terminate. On a throwaway copy of 670e4e8 without the fix it fails: "hung waiting for two of the runner's polls once the program is stopped for good ... nothing used CPU for 60 s", with the same "Service terminated: LocalClock" from runner.x:317 in its output; with the fix it passes. The throwaway repeat, with the fix and the same load: 600 rounds passed, no such exception. The CI test alone, 50 runs in a row (the first with --rerun-tasks --no-build-cache, then --rerun): 50 passed, each tests=1 failures=0 errors=0 skipped=0. SessionDebuggerTest whole, --rerun-tasks --no-build-cache, from its JUnit XML: 59 tests, 0 failures, 0 errors, 0 skipped. :javatools:javadoc and spotlessCheck pass. Limits: the CI run's dumps are lost, so that its hang was this one is inferred from the reproduction, which failed at the same line the same way, not seen. The test replaces xLocalClock.TIMER, a static that every runtime of the JVM shares, for its own run, and puts it back.
… synchronous path, on save and headless XtcFormattingService's line separator had no unit test: X364 covers Reformat Code's asynchronous path in the container, and the synchronous path, which a format on save and a headless format take, had no case of its own. XtcFormattingServiceTest is a light test of that path, which its headless IDE takes, as IntelliJ's async formatting support formats synchronously when headless; the server is the stub, as the Ecstasy server. StubLanguageServer gains textDocument/formatting with the edits a test gives it, textDocument/rangeFormatting, as LSPFormattingAndRangeBothService, which the service extends, takes only a server that has both, as the real one has, and xtc/endOfLine, which answers the line ending a test gives for the file. The cases, each a whole-file format of a file on disk whose .editorconfig, as the server answers, asks for CRLF, and whose lines end in LF: - a format that changes the text gives the file CRLF, which the save after it writes; - a format on save that changes nothing gives a document with changes CRLF, which the save writes with them; - a format that changes nothing of a saved file leaves its LF, and nothing is written. An explicit format saves its document first (AsyncDocumentFormattingService.prepareForFormatting), so only a format in a save meets a document with changes, which the save writes after it. The second case holds saves off while its format runs, with a FileDocumentSynchronizationVetoer, as the save in progress does. Validated: the three cases pass. On a throwaway copy of the service, each case fails against the change it is for: with the line that sets the file's separator removed, the first two fail; with the separator set whether or not a save will write the document, the third fails. The 25 test classes that use the stub, --rerun-tasks --no-build-cache, from their JUnit XML: 93 tests, 0 failures, 0 errors, 0 skipped; XtcFormattingServiceTest again after the stub's last change, the line ending as a function of the file's URI, which detekt asked for: 3 tests, 0 failures, 0 skipped. :lang:spotlessCheck passes and :lang:detekt reports 0 findings. Limits: the vetoer stands in for the IDE's save; the test does not run IntelliJ's Actions on Save itself.
…73 in StructureViews' stale symbols TODO Comments only: the code part of errs's register sweep of 2026-11-30 (9285288), whose register entries stay on errs. - TODO LSP4IJ: UP98 at the two show-and-hide pairs of the Language Servers view, in ParityWorkspace and CompilerPlaybook: LSP4IJ 0.30.1 traces a server's messages only once the console has a node for the server (redhat-developer/lsp4ij#19), so the console opens before the first case's traffic; our redhat-developer/lsp4ij#2060 traces from the start, for 0.30.2. - StructureViews' stale TODO LSP4IJ: #1738 now names UP73, whose fix that is; the check it guards applies only to a playbook run that names an LSP4IJ before 0.30.0, so it stays. Validation: :lang:intellij-plugin:compileIntegrationTestKotlin passes with -PincludeBuildLang=true -PincludeBuildAttachLang=true; git diff --check is clean.
…eport, with an IntelliJ action and a VS Code command ServerHealth, the playbook probe's class histogram and EmbeddingSupport.footprint() say how much heap is in use, but not which module, compile or cache holds it. xtc/heapReport walks the server's caches on the compiler's worker, between compiles (XdkAdapter.onCompilerWorker), root by root in a fixed order: the bundled XDK's modules, the core library first, and its static caches; the host's binary artifacts; then by workspace folder, each module in build order with its analysis, compiles, build, diagnostic index and navigation index entries; the adapter's graph-wide caches; the documents and the server's answers about them; and last the rest of what the adapter and the services reach. Each object counts once, for the first root that reaches it (an identity table), and a later root lists its references into it as shared. Per root the report counts the constants of its pools (ConstantPool.size()), its structures by component class, its AST nodes and trees, its compiler sources and its byte arrays, and estimates the size with ShallowSizeOf. It follows the fields of the server's and compiler's classes by reflection and reads the JDK's collections, atomic references and completed futures through their methods, as nothing needs --add-opens; other JDK objects count their own fields only. The services that own the caches stop the walk unless a root names one, and the free heap bounds the walk's table, which the report says if it stops. The report is plain text, logged and written to heap-report-<time>.txt in the server's log directory, whose cleanup now recognizes it; the response gives its path and totals. IntelliJ's Tools > Ecstasy Server Heap Report and VS Code's "Ecstasy: Server Heap Report" send the request and open the file. A first sample, two fixture modules compiled in the server's test (HeapReportServerTest): 720,409 objects, an estimated 52.8 MB, walked in 0.3 s. The bundled ecstasy module holds 204,764 objects (12.5 MB, 48,309 constants, 15,131 structures); each fixture module's analysis holds about 176,000 objects and 10.5 MB, 46,600 constants in 3 to 5 pools and 15,155 to 15,179 structures, which is a copy of the core library's structures per analysis, not shared with the bundle (each references the bundle about 101,000 times besides). Validation, with -PlspTests=all and the lang flags, results read from the JUnit XML after deleting the old ones: HeapWalkTest 4, HeapReportServerTest 2, ServerLogsTest 8, XdkLibrariesTest 7 and CompilerLibrariesTest 4 tests; the IntelliJ plugin's PluginManifestTest 15 and XtcProtocolEndpointsTest 2 tests; 0 failures, 0 skipped. The VS Code extension's npmCompile and eslint on the changed files pass, and its suite (testVscodeExtension, activation's command check among it) passes in the Podman container on this commit: 119 passing, 0 failing. :lang:detekt and spotlessCheck pass. No test asserts a heap figure or waits for a collection: they check counts and the report's structure.
…JVM of its own, by the same roots as the cache walk xtc/heapReport takes HeapReportParams now: with dump, the server also dumps its heap (HotSpotDiagnosticMXBean.dumpHeap, live objects, so a full collection first) to heap-<time>.hprof in its log directory, at once rather than between compiles, as a dump during a build shows what the build holds at its peak, and says whether the compiler was at work. The dump holds the walk's roots, a HeapDumpRoots that the server keeps reachable while it dumps, so the analysis attributes the dump to the same folders, modules and caches in the same order. The analysis runs out of process, as the execution worker does, from the server's own classpath and Java runtime (HeapDumps.analyzerCommand), never in the server's JVM; a limit of 30 minutes ends a hung one. The dump is deleted once analyzed unless keepDump; its file and the analysis' scratch file are names the log directory's cleanup recognizes. The response says what it took (a full collection, a dump of so many megabytes and its parse) and where a kept dump is. With no parameters the request is the walk alone, as before. The analyzer is the HprofAnalyzer of an earlier heap investigation, which matched jcmd's sizes within 1 to 2%, moved into lsp-server as Java: HprofHeap is its parser, reference graph and Lengauer-Tarjan dominator tree, unchanged but for its file handling and a few field readers; HprofAnalyzer is a proper main class (usage and exit codes 0, 1 and 2) whose report starts with the walk's table and lists, rendered by the same HeapReport, with sizes measured rather than estimated, each root's retained size, and the JDK's objects followed; then what only a dump shows: what no root reaches, by the GC root whose dominator subtree holds it (a compiling thread's frame, a class's statics); byte arrays by referrer, and the largest with their holders; retained size by module and by constant pool; byte arrays and strings with equal contents; and the largest GC roots. Its research-only sections (strings by kind, the owner-category matrix, the lazy-children search) are left out. IntelliJ's "Ecstasy Server Heap Report with a Heap Dump (Slow)" and VS Code's "Ecstasy: Server Heap Report with a Heap Dump (Slow)" send it with dump. A first sample, from the server test that dumps a server with one fixture module compiled (HeapReportServerTest): a dump of 99.1 MB in 0.1 s, its parse in 1.5 s. The roots hold 48.7 MB of the dump's 56.1 MB reachable, measured; the fixture module's analysis holds 264,845 objects and 10.8 MB, among them its own copy of ecstasy's pool (46,213 constants). What no root reaches is the test JVM's own (Gradle's worker, the JDK's caches). The retained sizes of this commit are too small: the next commit says why and fixes them. Validation, with -PlspTests=all and the lang flags, results read from the JUnit XML after deleting the old ones: HeapWalkTest 4, HprofAnalyzerTest 2 (a child JVM dumps a small heap with known roots; the analyzer counts the shared array once and the copy as a duplicate, and its main's exit codes), HeapReportServerTest 3 (two dumps, one deleted and one kept) and ServerLogsTest 8 tests; the IntelliJ plugin's PluginManifestTest 16 and XtcProtocolEndpointsTest 2 tests; 0 failures, 0 skipped. The VS Code extension's npmCompile and eslint on the changed files pass, and its suite passes in the Podman container on this commit: 119 passing, 0 failing. :lang:detekt and spotlessCheck pass (its Java layout check formatted the analyzer's alignment). No test asserts a heap figure or waits for a collection.
…the dump's dominator tree, so that retained sizes hold A throwaway probe on a kept dump of the server test's two compiled modules showed why the previous commit's retained sizes were too small: the dumping thread's frames hold the HeapRoot list and the HeapDumpRoots that describe the roots, and through them every root's objects, so each of those objects had a second GC root and the super root as its dominator; and the tree followed java.lang.ref.Reference's fields, so a bundled module's SignatureConstant, by its weak m_refSigPrev, made a path into an analysis' pool that keeps nothing alive. The dominator tree now leaves out the references of the HeapDumpRoots and HeapRoot instances (HprofHeap.read's detached classes, HprofAnalyzer.DESCRIPTIONS) and every field of Reference, as the roots' own walk already did; the graph keeps them, so the holders still name them. A root's retained size also leaves out an entry that an earlier root holds, which it only names. On that dump the analyses' copies of ecstasy's pool (46,213 and 46,166 constants, 2.9 MB each) are now dominated by their module's TypeCompositionStatement, and the bundled pools by the repository's TreeMap entries, where both had the GC roots before. A module's analysis still retains little alone (1.3 KB and 1.7 KB of about 10.8 MB each): what it holds is reachable from the module's other entries too, which the shared list shows. HprofAnalyzerTest's fixture now holds its objects in a static field, as a cache does, outside the roots' description, and its second root names the first's array and reaches it by a weak reference: the first root must retain the array and the second must not. Without this change the first retains 24 bytes, its holder alone, and the test fails; with it, HeapWalkTest 4, HprofAnalyzerTest 2, HeapReportServerTest 3 and ServerLogsTest 8 tests pass with -PlspTests=all, 0 failures, 0 skipped, read from the JUnit XML after deleting the old ones. :lang:detekt and spotlessCheck pass.
…elete a closed session's dumps at once The review found that ServerLogs used one pattern for both what its cleanup deletes and what xtc/exportLogs ships, so a running or kept heap dump's tail, with source text in it, and the analysis' scratch file went into the support bundle; and a file deleted while the bundle was made, as a dump is once analyzed, failed the export with NoSuchFileException. The patterns are now three: the logs and traces, which the bundle takes; heap reports; and heap dumps with their analysis files. A closed session's cleanup recognizes all three, and deletes its dumps at once, whatever the retention keeps of its logs, as a server that was killed mid-analysis leaves one as large as its heap. The export reads each file's time and opens it tolerating one that is gone, which it leaves out. ServerLogsTest has three new cases, which fail with the previous ServerLogs.kt and pass with this one: the bundle of a session with a dump, its analysis file and a report takes none of them; a file that is gone when the bundle opens it (a mocked path that exists when listed) is left out and the bundle is made; a closed session's dumps are deleted at once while retention keeps its log and report. With -PlspTests=all and the lang flags, ServerLogsTest 11 tests, 0 failures, 0 skipped, from the JUnit XML after deleting the old ones. :lang:detekt reports no finding in ServerLogs (the extra condition went into ownFile, which kept pruneClosed under its complexity limit); spotlessCheck passes.
…here it fits, and name every failure
The review found that a server that exits or shuts down during an analysis left the analyzer JVM running and the dump,
as large as the heap, on disk; that two dump requests could run together, with nothing checking the disk or the
analyzer's heap; that two requests in one millisecond collided on their file names; that a timeout was reported as
"analysis failed: null"; and that the analysis' scratch file was deleted only on the normal path.
HeapDumps now owns the dumps' files and the analyses' processes until each is released. close(), which
HeapReports.close() and so XtcLanguageServer.close() call, and a shutdown hook for System.exit, end the processes,
wait for them, and delete the files; after it, nothing starts and a request is refused, with a ResponseError that says
the server is shutting down. The analyzer, as the server starts it (--until-input-ends), reads its input to the end
on a daemon thread and exits with 3 when it ends, as when the server is killed; a closed session's cleanup deletes its
dumps (the previous commit). One dump at a time: a request for a dump while one is taken is refused with why, and a
walk alone still runs. A dump is refused unless the log directory's store has room for one and a half times the heap
in use and 256 MB; the analyzer gets -Xmx of three times the dump and 256 MB, and is refused, with the walk's report
still written, when that is more than half of the machine's memory. Files are named by the millisecond and the
request's number. The analysis' outcome is decided where its process ends or times out: a timeout says it took longer
than the limit and was ended; the process is ended and waited for, as Windows ends one some time later, before its
scratch file is deleted, whatever the outcome; a deletion that fails is logged and fails no report.
Tests, with -PlspTests=all and the lang flags, from the JUnit XML after deleting the old ones: HeapDumpsTest 7 (a
timed-out analysis is ended, named and leaves no file; a failed one names its exit code; close ends a running analysis
and deletes the dump and its file, and refuses the next; no room refuses the dump; the analyzer's heap is sized to the
dump, and refused where the machine is too small; a second dump while one runs is refused, a walk is not, and closing
ends the first; requests of one millisecond get files of their own), HprofAnalyzerTest 3 (its new case: as started by
the server, it exits with 3 when its input ends, while blocked opening a pipe), HeapReportServerTest 4 (a closed server
refuses a report and says why), HeapWalkTest 4, ServerLogsTest 11; 0 failures, 0 skipped. A stand-in analyzer
(AnalyzerStub) and a stand-in dump writer keep these from dumping the test JVM. Against this commit's parent's main
files, the checks that its API can run fail: the timeout's message (a bare TimeoutException), the refusal after close
("XDK adapter is closed"), and the analyzer's end with its input (exit code 2, a command line it did not know); the
others use API that this commit adds. :lang:detekt has no finding in these files; spotlessCheck passes.
…r's singleton, and clear detekt's findings The review found that HeapWalk's limit bounded the objects it had processed, while reach() added each object's references to its identity table and its pending list before the check, so the table, which the limit exists to bound, could grow well past it. reach() now refuses a new object once the table holds the limit, and the walk stops there, saying how many objects the table held and that the roots after the one it stopped in count nothing. The "embedding support" root named EmbeddingSupport's class, whose statics are a lock and a console; the server's instance, with the repository and connector it is configured with, lives in its Singleton holder. The root now names EmbeddingSupport.instance(), walked before XdkLibraries' statics, whose lazily configured value holds it too. detekt reported three findings over the baseline, which are fixed: HeapWalk's table estimate names its load factor (MAX_LOAD), and XtcTextDocumentService's heap roots are a property, which keeps the service at its function limit. Tests, with -PlspTests=all and the lang flags, from the JUnit XML after deleting the old ones: HeapWalkTest 5 (its new case: a walk limited to 3 stops, says STOPPED, holds no more than 3 objects in its table, and counts nothing for the roots after), HeapReportServerTest 4 (the singleton's root holds objects and refers into the bundle's roots), HprofAnalyzerTest 3 and HeapDumpsTest 7; 0 failures, 0 skipped. Against this commit's parent's main files the two new checks fail: the table held 66 objects with a limit of 3 (read by reflection, as the parent has no accessor), and the singleton's root referred to nothing. :lang:detekt reports 0 findings over the baseline; spotlessCheck passes.
…javatools fields the analysis reads by name The review found that HprofHeap trusted its input: an identifier size other than 4 or 8 was read as 4; array lengths were read signed, so a length of 2^31 moved the reading backwards; no read was checked against its record or the file; and the superclass walks of layout() and subclassesOf() went round a cycle forever. Each now fails at once with a Malformed error that says what and where: the header must be HPROF's, the identifier size 4 or 8, each record and sub-record must fit what holds it before it is read, lengths are unsigned and must fit a Java array, a basic type must be one of HPROF's, an instance's class must be known and its fields must fit its record, and a superclass chain longer than the classes are many is a cycle. The review also asked for modern Java with minimal mutable state. HprofHeap's state is private behind accessors (objects, kinds, sizes, references, dominators by object), its parallel primitive arrays kept for memory; its names are plain (ids, offsets, layoutTypes, layoutCodes, superRoot, fieldBytes, staticValues, className, fieldLabel); a class is a record, built once named and laid out from the raw records of the dump, and the identifier size is final. HprofAnalyzer names its classes by class literal, its javatools ones among them, and reads fields through HprofHeap.Field constants, each with the class that declares it; owningFile's fallback to a field "f_struct", which no class has, is gone. HprofAnalyzer.roots(Path) gives a dump's roots to the server's tests. The analyses of the parent and of this commit write the same report, byte for byte, on the dump of HeapDumpFixture's JVM. Tests, with -PlspTests=all and the lang flags, from the JUnit XML after deleting the old ones: HprofHeapTest 5 (new: an identifier size of 3, a record past the file's end, an array of 2^31 elements and a superclass cycle each fail at once with Malformed, bounded against a hang; and every field read by name is declared by the class named with it, so that a rename in javatools fails a test rather than zeroing a report), HeapReportServerTest 4 (its dump case now reads the kept dump of a server with a compiled module: its roots include ecstasy.xtclang.org and Library, whose caches have constants and syntax trees), HprofAnalyzerTest 3, HeapWalkTest 5 and HeapDumpsTest 7; 0 failures, 0 skipped. Against the parent's HprofHeap and HprofAnalyzer the four malformed dumps fail their checks: "subtag 0 at 40" for the record past the end, an out-of-bounds read at a negative offset for the array, no error for the identifier size, and the cycle still looping after 60 s. :lang:detekt reports 0 findings over the baseline; spotlessCheck passes.
…n when a heap report is refused The review found that VS Code showed only its generic "command failed" when the server refused or failed a heap report, and that neither editor showed that a heap dump, which can take minutes, was running. VS Code's two commands now go through heap-report.ts: a refused or failed request is logged to the server's output channel and shown as an error with the server's reason, and a dump is asked for behind a progress notification, a walk alone without one. IntelliJ's dump action runs a background task that shows its progress until the server answers, and its error notification gives the server's reason rather than the wrapping exception's. Tests: the VS Code suite's new heap-report.test.ts drives the command's code with the server's connection and the editor's windows stood in for: a refused request is logged and shown with its reason and answers nothing; only a dump is asked for behind the progress notification, each report is opened, and the requests carry dump and keepDump. The suite passes in the Podman container on this commit, 121 passing, 0 failing, these two among them; tsc, eslint over src/ and npmCompile pass. The IntelliJ plugin's PluginManifestTest 16 and XtcProtocolEndpointsTest 2 tests pass, 0 failures, 0 skipped, from the JUnit XML after deleting the old ones; its progress task has no unit test, as one would need the IDE. Against the parent's extension.ts the new suite test does not compile, as the module it drives is this commit's. :lang:detekt reports 0 findings over the baseline; spotlessCheck passes.
… a probe run on request ServerMemoryProbe drives a server in the test JVM over a generated workspace of N modules, in a chain and in a fan, the last module of 400 classes and the others of two. It walks the caches and dumps the heap after an embedded build with nothing open, with the last module open, with every module open, and after a build again, with a dump also as the last module's compile ends. It checks nothing: it runs only when XTC_LSP_MEMORY_PROBE names the sizes, and otherwise reports skipped. What it finds on this tree, from the dumps, which count live objects: N shape built, nothing open: build cache all open, rebuilt mid-build 2 chain 27.9 MB retained, 8 pools 106.9 MB live 106.5 MB live 2 fan 27.9 MB retained, 8 pools 107.1 MB live 106.6 MB live 10 chain 121.5 MB retained, 120 pools 295.2 MB live 294.8 MB live 10 fan 119.9 MB retained, 48 pools 292.0 MB live 291.6 MB live 30 chain 370.8 MB retained, 960 pools 796.9 MB live 796.6 MB live 30 fan 349.9 MB retained, 148 pools 754.0 MB live 753.7 MB live After a build with nothing open, each module's build cache entry keeps its compile, about 11.5 MB for a small module: the syntax trees and the compile's own copies of ecstasy, the turtle and the modules it imports. With every module open, each module's analysis keeps one more such compile. The walk sees the analyses but not the build cache's share, 3.3 to 4.3 MB for all modules: it reads JDK collections through their public methods, and the cache entry holds the analysis' documents through a key-set view, which the next commit replaces with a copy. Limits: the figures are the whole test JVM's live objects, so about 48 MB is the floor; the workspaces are generated, of small modules and one of 400 classes, not a real one. The heap report credits each object to the first root that reaches it, so a module's row leaves out what an earlier root, such as the bundle, reaches too. Validation: XTC_LSP_MEMORY_PROBE=2,10,30 ./gradlew :lang:lsp-server:test --tests '*ServerMemoryProbe' -PlspTests=all --rerun on f459a2b: 1 test, 0 skipped, 0 failures, 4 min 26 s; again at N = 2 after detekt's finding was cleared, with the same figures. :lang:lsp-server:spotlessCheck passes, and :lang:detekt reports nothing.
…che keeps no compile ModuleAnalysis took documents.keys as its document URIs: a view, which holds the map of the documents, their syntax trees, and through them the whole compile, with its own copies of ecstasy, the turtle and every module it imports. The module build cache keeps that set in each CachedBuild, so after an embedded build every built module kept its compile, about 11.5 MB for a small module, until a document's close or a change let the entry go; and the closure compile of an open module kept each dependency's compile until it ended, against compileClosure's intent of releasing dependency trees as the fold moves on. A copy holds the URIs only. The heap walk did not see it, as it reads a JDK collection through its public methods, which iterate a view's keys and not the map behind them. A dump's analysis does: the new test builds two modules with nothing open, dumps the heap, and finds no constant pool and no syntax tree in any module's caches, where it found 8 pools without the fix. ServerMemoryProbe, live objects in the dumps, before and after: N shape built, nothing open all open, rebuilt mid-build 2 chain 75.9 -> 48.0 MB 106.9 -> 78.9 MB 106.5 -> 106.5 MB 2 fan 76.3 -> 48.4 MB 107.1 -> 79.1 MB 106.6 -> 106.6 MB 10 chain 170.4 -> 48.7 MB 295.2 -> 173.6 MB 294.8 -> 202.0 MB 10 fan 168.9 -> 49.0 MB 292.0 -> 172.0 MB 291.6 -> 199.7 MB 30 chain 420.7 -> 49.8 MB 796.9 -> 426.0 MB 796.6 -> 456.7 MB 30 fan 400.0 -> 50.0 MB 754.0 -> 404.0 MB 753.7 -> 431.7 MB The build cache now holds about 0.6 to 0.8 MB for all modules, their artifacts and diagnostics. What remains per open module is its analysis' compile, which the next commit takes out. Limits: the new test checks two modules after one build. The heap report credits each object to the first root that reaches it, so a pool that an earlier root, such as the bundle, also reaches would not count for a module's caches; a compile's own copies are reached through its module only. Validation: the new test fails without the fix (expected 0L but was 8L) and passes with it. ./gradlew :lang:lsp-server:test --tests '*HeapReportServerTest' --tests '*XdkProjectServerTest' --tests '*XdkAdapterTest' --tests '*XdkAdapterLifecycleTest' -PlspTests=all --rerun: 48 tests, 0 skipped, 0 failures. The probe at N = 2, 10 and 30: 1 test, 0 failures.
…analysis keeps no compile An analysis kept each document's compiled syntax tree, which refers to the compile's structures, and through them to the compile's own copies of ecstasy, the turtle and every module it imports: about 11 MB for each open module, however small, kept as long as one of its documents is open, or as a closed module's analysis answers queries. Of the tree, the features read only the text (semantic tokens, document links), the folding regions and the spans that a selection expands through; everything else they read comes from the semantic models, which are detached already. XdkAst.outline copies those out as the analysis is made, into XdkOutline: the text, the blocks' and the imports' folding regions, and a tree of spans that keeps, for each node, the children that XdkAst.chainAt stepped into: those of the document's own source, within the node's span. Folding and selection read the outline as they read the tree, so their answers are the same, but for one case, which threw before. Parameter.getEndPosition throws a NullPointerException for a parameter with a name and no type (xvm#835, fixed by #836), and every type parameter without `extends` is one: Parser.parseTypeParameterList gives the Element of `class Box<Element>` no type. XdkAst.chainAt read the span of each child of every node on a selection's path, so on errs a selection anywhere inside such a class failed, at the type parameter and in the class's body alike: the server logged "textDocument/selectionRange: request failed" and the client got the JSON-RPC error "Internal error.". The outline gives such a parameter its name's extent, which is what the javatools fix gives, under a TODO to use the plain getters once errs has it. A new XdkAdapterTest test selects at Element in `class Box<Element>`: the innermost range is the name, and each step out is strictly larger, up to the module. ServerMemoryProbe, live objects in the dumps, after the previous commit and after this one: N shape last open all open, rebuilt mid-build 2 chain 64.7 -> 49.2 MB 78.9 -> 52.0 MB 106.5 -> 68.1 MB 2 fan 64.9 -> 49.4 MB 79.1 -> 52.2 MB 106.6 -> 68.3 MB 10 chain 65.7 -> 49.8 MB 173.6 -> 52.9 MB 202.0 -> 69.4 MB 10 fan 65.5 -> 50.0 MB 172.0 -> 53.0 MB 199.7 -> 69.1 MB 30 chain 68.0 -> 50.9 MB 426.0 -> 55.1 MB 456.7 -> 72.8 MB 30 fan 66.6 -> 51.1 MB 404.0 -> 54.7 MB 431.7 -> 70.9 MB An open module of two classes now costs about 40 KB, the 400-class module about 4.1 MB, mostly its semantic models; before, 11.1 and 18.9 MB. The mid-build figure is now the bundle, the analyses and the one compile in flight. Opening and analyzing every module took no longer: 2.6 and 2.3 s before, 2.1 and 1.7 s after, in the chain and the fan at N = 30, one run each. The heap tests' module caches now hold no constant pool, structure or syntax tree, which they assert; the counting of syntax trees, which they covered, moves to HeapWalkTest and to a third root of HeapDumpFixture for HprofAnalyzerTest. Limits: the outline is made as the analysis is, so a throw while making it now fails the module's analysis rather than one folding or selection request; review found no case that throws. Only one open module is checked in a dump, HeapReportServerTest's Library. The heap report credits each object to the first root that reaches it, so a pool that an earlier root also reaches would not count for a module's caches. The outline's text duplicates the module's source text, which the analysis keeps too: 64.5 KB for the 64 KB module, among the dump's duplicate strings; the tree held the same text as a char[], twice the bytes. Validation: the new selection test fails on errs at f459a2b, with XdkAst and XdkAdapter from there (NullPointerException in Parameter.getEndPosition, from XdkAst.contains in chainAt), and on this commit's first version, which left the parameter out (innermost range the class). Over JSON-RPC, a selectionRange at Element answered ResponseErrorException "Internal error." on errs, and with this commit four ranges, from Element out to the module. ./gradlew :lang:lsp-server:test -PlspTests=all -PincludeBuildLang=true -PincludeBuildAttachLang=true --rerun over HeapWalkTest, HprofAnalyzerTest, HeapReportServerTest, FoldingRangeTest, SelectionRangeTest, XdkFoldingTest, XdkStructuralTest, XdkRecoveryTest, SemanticTokenTest, XdkSemanticColorTest, XdkSourceLinksTest, XdkAdapterTest, XdkEditingTest, XdkDeclarationHeaderTest, XdkTypeHeaderTest, XdkInitializerTest, XdkL65ClosureTest, XdkBlockedModuleTest, XdkPresentationTest, NavigationTest, XdkSemanticTokenProtocolTest, XdkFeatureResolveProtocolTest, LspIntegrationTest, XtcLanguageServerTest, CapabilityNegotiationTest, XdkAdapterLifecycleTest, LibraryContentProtocolTest, XdkLibrarySourcesTest, XdkLibrarySymbolsTest, XdkLibraryDocumentsTest and XdkRepositoryWorkspaceTest: 55 classes with the nested ones, 283 tests, 2 skipped (NavigationTest's two @disabled), 0 failures. The whole suite, -PlspTests="!slow & !heavy": 356 classes, 2859 tests, 3 skipped (the two @disabled and the probe), 0 failures. The probe at N = 2, 10 and 30: 1 test, 0 failures. :lang:lsp-server:spotlessCheck passes; :lang:detekt reports nothing. The editor cases X1, X41, X92, X126, X158, X248, X350 and X354 passed in the container on the first version of this commit, in VS Code and IntelliJ, X350 and X354 at their documented partial in IntelliJ.
The Plugin Verifier resolved LSP4IJ itself: it takes a plugin's dependencies that the IDE doesn't bundle from the Marketplace, as the newest release that the IDE accepts. LSP4IJ 0.30.2 came out on 2026-11-30, so verifyPlugin checked the plugin against 0.30.2 while it builds against 0.30.1, and verifyPluginInternalApis failed CI run 46469589422 on #693. A local run reproduced it: the dependencies.txt for IU-263.7307.353 had "+--- com.redhat.devtools.lsp4ij:0.30.2", and the Verifier downloaded 23257_1230495.zip into ~/.pluginVerifier. verifyPlugin now runs the Verifier offline (the task's offline property, -offline) with plugin.verifier.home.dir set to build/pluginVerifierHome. Offline, the Verifier takes those dependencies from its home's loaded-plugins directory alone, and preparePluginVerifierHome syncs into it the intellijPlatformPlugin configuration, which prepareSandbox installs: the catalog's LSP4IJ 0.30.1, or the one that -Plsp4ijVersion, -Plsp4ijChannel or -Plsp4ijPlugin names. Offline, it also no longer fetches the newest Marketplace plugins that bundled plugins optionally depend on (Android, Rust, KMM, CLion Nova and native debugging were in the old dependency graph). The Verifier's IDEs are the catalog's too: lang-intellij-ide (2026.2.3, IU-262.10968.63) and lang-intellij-next-ide (2026.3, IU-263.7307.200), in place of the newest stable release that JetBrains' release feed named (2026.3.0.1, IU-263.7307.353), so verification reads no release feed. verifyPluginInternalApis says which LSP4IJ it found when a Verifier dependency report holds another one, and which LSP4IJ its policy reviews when the build asks for another one. Rejected: the Verifier CLI (1.411) has no option that supplies dependency plugins; its plugin-list argument verifies every plugin it lists, and IPGP passes the plugin archive in that place. IPGP 2.20.1's pluginVerification has no dependency setting, and its task passes only the archive and the IDEs. An IDE copy with LSP4IJ in it would make LSP4IJ a bundled plugin, a layout no user runs, for a 4 GB copy. plugin.repository.url would need a Marketplace server. Validation, in a worktree whose gradle.properties includes lang: - before: verifyPlugin against IU-263.7307.353 with LSP4IJ 0.30.2; the gate failed as on CI - after: reports for IU-262.10968.63 and IU-263.7307.200, both Compatible with 79 internal API usages, each dependencies.txt with "+--- com.redhat.devtools.lsp4ij:0.30.1"; the gate passed with 158 known LSP4IJ usages - -Plsp4ijVersion=0.30.2: both reports have 0.30.2, and the gate fails with "The internal API policy reviews LSP4IJ 0.30.1, not LSP4IJ 0.30.2: review it for 0.30.2 before changing the dependency version" - verifyPlugin --rerun stored the configuration cache, and a second run reused it and downloaded nothing: no new file in Gradle's modules cache, 0 B from the Verifier, ~/.pluginVerifier as it was - :common-plugins:test --tests InternalApiPolicyTest: 10 tests, 0 skipped, 0 failures - spotlessCheck and :lang:spotlessCheck Cost of two IDEs, measured locally: the Verifier took 9.5 s with 2026.2.3 alone (one run) and 12.2 to 13.4 s with both (three runs; 17.2 and 24.0 s in two beside other builds), as it verifies them in parallel; online, against one IDE, it took 52.5 s. The reports are 840 KB for two IDEs, 832 KB for one before. The verified 2026.2.3 is the compile dependency's installer, so one IDE is downloaded besides it, as before. Each verified IDE is extracted into Gradle's transforms cache: 4.2 GB for 2026.2.3 and 4.4 GB for 2026.3, where 2026.3.0.1 took 4.5 GB. Limits: a build-logic change extracts both IDEs again into new transform directories (this commit's gate change did). On CI, which extracts IDEs into .intellijPlatform/ides by name, the verified 2026.2.3 should share the compile IDE's directory; that is read from IPGP's source, not measured. On 2026.2.3 the report lists the optional com.intellij.problemsView as missing, as it is part of the platform there. installPlugin still lets the IDE's installPlugins command take the newest LSP4IJ into a user's own IDE.
… catalog
The IntelliJ Platform Gradle Plugin takes the newest version of a tool that the build doesn't name:
pluginVerifier() and the Marketplace ZIP Signer that it adds itself both resolved "{prefer +}", to
1.411 and 0.1.45 today. The catalog now names those versions, lang-intellij-plugin-verifier and
lang-intellij-zip-signer, and the plugin's build passes them to pluginVerifier and zipSigner, so a
newer one is a deliberate bump.
Validation, on the tree with this commit and the next two:
- :lang:intellij-plugin:dependencies before: verifier-cli:{prefer +} -> 1.411 and
marketplace-zip-signer:{prefer +} -> 0.1.45; after: verifier-cli:{prefer 1.411} -> 1.411 and
marketplace-zip-signer:{prefer 0.1.45} -> 0.1.45
- verifyPlugin --rerun logged "Starting the IntelliJ Plugin Verifier 1.411", verified
IU-262.10968.63 and IU-263.7307.200 against LSP4IJ 0.30.1, and the gate passed with 158 known
LSP4IJ usages; it stored the configuration cache, and a second run reused it and downloaded
nothing: no new file in Gradle's modules cache, 0 B from the Verifier
- spotlessCheck and :lang:spotlessCheck
Limits: signPlugin, the signer's one user, runs only when publishing, with the signing secrets, and
didn't run here; the dependencies report shows the version it resolves.
…f a newer one too
installPlugin had the IDE's installPlugins command install LSP4IJ by its id. That command takes
plugin ids alone ("installPlugins pluginId* repository* ..."), installs the newest version that the
IDE accepts from the Marketplace, and skips a plugin that is installed in any version. The task now
installs the plugins that the build resolves for its sandbox, the intellijPlatformPlugin
configuration: the catalog's LSP4IJ, or the one that -Plsp4ijVersion, -Plsp4ijChannel or
-Plsp4ijPlugin names. As with the plugin itself, each is copied into the plugins directory in place
of the directory of its name, a newer version too, and its log line names the version it replaced,
and a downgrade as one, from the versions that the plugins' descriptors name. installPlugins still
runs bare, to learn the plugins directory and to refuse a running IDE.
Validation, against a scratch installation, never the user's IntelliJ:
- the IDE: an APFS clone of Gradle's extracted IntelliJ IDEA 2026.2.3, whose bin/idea.properties
points idea.config.path, idea.system.path, idea.plugins.path and idea.log.path into a scratch
directory; IDEA_VM_OPTIONS named a scratch vmoptions file, with -Duser.home in that directory,
as the launcher otherwise reads the user's own; the probe's log showed those paths
- its plugins directory held LSP4IJ 0.30.2, unpacked from the Marketplace zip
- installPlugin -Porg.xtclang.idea.home=<clone> logged "Installed lsp4ij 0.30.1 into IntelliJ IDEA
262.10968.63, in place of the newer 0.30.2: a downgrade", then installed the plugin zip;
lsp4ij/lib held lsp4ij-0.30.1.jar
- a second run logged "..., in place of the same version"
- no file in the user's IntelliJIdea2026.2 config or caches, or in the JetBrains logs, changed
- :common-plugins:test --tests IntellijInstallationTest --tests InternalApiPolicyTest: 7 and 10
tests, 0 skipped, 0 failures; :common-plugins:validatePlugins
- verifyPlugin and its gate, configuration cache stored, then reused (see the previous commit)
- spotlessCheck and :lang:spotlessCheck
Limits: an LSP4IJ installed in a directory with another name than lsp4ij is neither found nor
replaced. The build-logic change extracted IntelliJ again into a new transform directory during the
first run, which rewrote lang/.intellijPlatform/localPlatformArtifacts/.../platform-path.txt, so
the second run calculated the configuration cache again; that happens after any build-logic change.
… in testing.md Section 11 said that the Plugin Verifier was commented out and suggested recommended(). It now says what verifyPlugin does: the catalog's Verifier checks the catalog's two IDEs offline, against the LSP4IJ that the build resolves, and verifyPluginInternalApis then gates internal APIs and the LSP4IJ version. It names the catalog entries rather than their versions. Section 12 named LSP4IJ 0.21.0 three times. It now points to lang-intellij-lsp4ij in the catalog, so the text doesn't go stale with the next bump, and lists verifyPlugin and installPlugin among the tasks that use that version. Only these two sections changed. Both new links resolve from lang/intellij-plugin (../../gradle/libs.versions.toml and verifier-lsp4ij-apis.txt), and the headings, which the table of contents links, are unchanged. Section 12's table still lists com.intellij.java, which plugin.xml doesn't depend on, and leaves out the plugin's other dependencies.
…rrs has #836 The outline gave a parameter with a name and no type its name's extent itself, because Parameter.getEndPosition threw for it (xvm#835). errs has #836's fix since its rebase onto master, so the outline reads every node's extent through the plain getters again and the TODO: xvm#835 workaround goes. Validation: - XdkAdapterTest's selection at Element in class Box<Element> passes on the plain getters: the innermost range is the name, and each step out is strictly larger, up to the module - :lang:lsp-server:test with -PlspTests=all for XdkAdapterTest, HeapReportServerTest and the folding, selection, semantic token and document link classes: 22 classes, 88 tests, 0 failures, 0 skipped (JUnit XML, old results deleted first) - :lang:lsp-server:spotlessCheck and :lang:detekt pass
…ng every attempt Review finding (low): a build whose modules' files changed on disk while each of its attempts compiled, MAX_BUILD_ATTEMPTS of them, ended cancelled with nothing in its result, though no one cancelled it; only the server's INFO log said why. The fix: such a build's cancelled result carries an error diagnostic of a new code, BUILD-INPUTS-CHANGED, "The build stopped: its modules' files changed on disk while it compiled, each of the 3 times it compiled them", which the build response gives the client. A build that someone cancelled still carries none. Validation: EmbeddedBuildInputsTest, a new case: a build whose Part.x is saved again during each of its compiles compiles three times and ends cancelled with that diagnostic alone. It passes, in the previous commit's run of the 19 affected classes. With the previous commit's XdkAdapter.kt and this test, it fails.
|
Replaced by #838: the same code as this PR's head ( This branch stays, with its full history, as the reference. The plugin previews keep their release, |

This is the complete compiler-backed language tooling for Ecstasy, provided as a reference: the language server, its IntelliJ and VS Code integrations, building, running and debugging programs from both editors, and the compiler and embedding mechanisms outside
lang/that make them possible. It is here so people can build and try the complete product, and see why those mechanisms are needed. It is not meant to merge as it stands; its parts land on master as their own pull requests.Start with javatools/lsp-compiler.md — Compiler support for the language server. It explains what changed in javatools, why the compiler-backed language server needs it, how the mechanisms work, and their compatibility and validation contracts, with a file-by-file appendix of every changed javatools file.
Summary
Why?
What it holds
How the branch is organized
The branch is 276 commits on master. Each is one feature or follow-up and compiles on its own (javatools, the language server, the DAP server, the IntelliJ plugin with its integration tests, and the VS Code extension), and none after the listener contract's migration uses the old reporting form.
1–7, compiler foundations: repository read failures; the listener contract in three steps (reporting apart from abort policy, explicit listeners and reasons for silence, scoped parser diagnostics); host compilation outcomes; compilation-owned syntax and semantic facts; recovery, cursor fitting and declaration analysis.
8, the integration: compiler-backed language support in the server, IntelliJ and VS Code.
9–19, foundation follow-ups: repository reporting and caching, tooling contracts, compiler output without the binary AST, CI and test isolation, LSP4IJ API checks, the compiler guide, code-action and rename guards, the restart CLI, and the compiler AST cleanup.
20–45, the product: embedded build and run, console input, build modes and supervised workers, entry points, the playbook cases, server responsiveness and document synchronization, formatting, refactorings, run lifecycle, and the LSP4IJ channel option.
46–67, debugging: debug sessions, variables and stepping, exception stops and pause, watches and expressions, conditional breakpoints and logpoints, code run from the Debug Console, value views, source revisions, worker soak, Run to Cursor, library frames, step targets, function and data breakpoints, Restart Frame, inline values, and the IntelliJ checks for LSP4IJ's fixes.
68–95: README updates, a rename-proof fix that master's newer fixtures needed, the VS Code client without the startup workarounds that
vscode-languageclient11.0.0, on master since Clear 3 of 5 Dependabot alerts, and take vscode-languageclient 11.0.0 #744, makes unneeded (Preserve the startup promise when initialization loses its connection microsoft/vscode-languageserver-node#1867, and our Handle the stop that follows a failed initialization microsoft/vscode-languageserver-node#1896), DAP's order of a step's response and the stop where the step ends, and an uncaught-exception stop that the runner's owncatchno longer prevents. Then refactoring: inline every use of a private member and remove it, check X103's moved member after Undo, Safe Delete of unused public and protected members, which names the modules it checked, and an Explorer move that keeps its Ecstasy edits with refactoring auto-save off. Then a host can give lazy variables' code longer than the one second ofON_DEMAND, which the debugger tests use on a loaded machine. Commit 79 attaches the debugger to a program run outside the editor with--debug(Debugging), and 80–83 make tests injavatoolsand the language server wait for what they check instead of for time. 84–89 fix the IntelliJ cases that failed only in full runs: an edit lost when the language server restarts during it (X259), a library frame without its source (X324), and the harness's waits in X74, X257 and X259. 90 runs the IntelliJ playbook in a Linux container on a virtual display, where no other window takes the IDE's focus, and 91 has two more debugger tests check what their sleeps waited for. 92 analyzes again an open document whose analysis the compiler retired without a replacement, which left VS Code pulling its diagnostics without end (X116); 93 has both playbooks' diagnostics waits take only the server's report for the document as it is now, not one from before an edit; and 94 fixes the container's runs: a user instead of root, an init process that reaps the Gradle daemon a cancel stops, JDK 25 for the XDK's launchers, and mavenLocal on a volume. 95 spells the server'sanalyzeandanalyzeOnethe American way.96–100: Debug of Gradle-mode runs in both editors (Debugging); the lang build fails on a compiler warning, and the ten it had are fixed;
compileXtcno longer takes from the build cache a module compiled in another copy of the project, whose recorded source paths are the other copy's, so breakpoints did not bind; IntelliJ keeps the language server running while a run or debug session uses it, which LSP4IJ stopped 5 s after the last Ecstasy file closed; and the root build'scontainerPlaybook*tasks run both editors' playbooks in the container, with the container commandorg.xtclang.docker.commandnames.101: continuing, stepping or pausing one fiber while the program's other fibers stay stopped, with DAP's
singleThread(Debugging).102: linked editing with the caret just after a local's name, where typing appends to it; the server linked nothing there, only inside the name.
103: a test that a page of a value's variables starting at or past its end is empty, as DAP 1.71 specifies for a
variablesrequest (fix: clarify behavior of start/count in variablesarguments microsoft/debug-adapter-protocol#580);SessionDebuggeralready did that, so only the test changes.104–114, the rest of R13: Debug of a command-line run, which
xtc runruns and which connects back; the debugger agent moved into javatools, with its protocol as records, and found by its provider's name in an agent jar; a debugged task's last output; deduction that finds a named module insrc/main/xbeside other sources; running and debugging a module's xunit tests from both editors, embedded, in Gradle and command-line mode, and in IntelliJ's test console, with tests reported as xunit's own JSON events; a closure compiled as a fold, without mutable accumulators; and no lazy-value time limit for the embedded execution tests' worker (Debugging).115–145: the docs brought up to date: the debugger's attach and R9–R12 features, running and debugging tests, the playbook catalog's 342 cases, every VS Code command by its title,
lang/README's task paths and versions, the editors' test, attach and debug-task sources, the playbook container, American spelling, the editors' names as their UI reads them, Java 25 for every adapter, javatools' debugger, agent and provider, and IntelliJ's breakpoint pass count's own LSP4IJ fix. Then doc comments that stay on their properties and methods; completion of a member access at a line's end or right after its dot, and of the language model's keywords and built-in types; hover that names a type by what it is; a run's events delivered to dap-server'sProgramEvents; the formatter's shared empty-block skeleton; an embedded run's process handler in one place; camel case for properties that hold behavior or mutable state; the LSP tests split into a fast default tier and complete runs; Ecstasy's Code Style settings page, and its live templates in Ecstasy files only; Debug of a program that has an interface; and code actions in a module with aconstthat has atoString.146–193: tests that wait for a hang only, not for a fast machine; playbook container runs queued on one machine lock, each with its own export, and the playbook's IDE started from one place without the plugins it does not use; and a recorded tour of the IntelliJ plugin on a card game that checks what it shows. In IntelliJ: a PSI of the Ecstasy language, with Enter closing and indenting blocks; Organize imports from Optimize Imports, which also removes unused imports; brackets and words as plain text had them; Rerun Failed Tests; a line typed in the Debug console taken to the session; Undo of a server's one-file edit without asking; a method's call inserted when its completion is chosen; LSP4IJ's held edits sent before completions and signature help; a Gradle-imported project built embedded; and a closed file's errors from the workspace report. In the server: a library declaration's doc comment in hover; completion and signature help at a line's end, and a type of another module with its import; a moved type's import; Extract with an injected local and from whole lines; Create class for a statement that constructs it; code actions proved only as a request asks, compiling only the modules an edit reaches, from the previous revision's compile; on-type formatting without waiting for a compile; requests from a restarted client; and every class's errors from an embedded compile. In the runtime and the tools:
configurationDonebefore a debug session starts its program; earlier stops kept out of a clock alarm; Future callbacks that throw or that a terminated service drops; enum values in breakpoint conditions, and why a condition cannot be evaluated; a stopped run's end; andxtc test,runandbuildthat take a project's test module with its modules, in the same order in every JVM.194–221: a test's hang found by the CPU it stops using; a stopped run shown as stopped; a spare key per thread for a hasher map; the debugger's expression fragment made physical, which ends a paused session's daemon loop; a service's shutdown completed however it goes; tests that throw reported as aborted, with later exceptions kept and skipped tests counted; in IntelliJ, Rerun Failed Tests on a test run, Run 'All Ecstasy Tests', the embedded build's errors in the Problems window, and code action answers in full again after a budget; testXtc never taken from the cache; compiles kept for modules whose dependency's API stayed; the server saying which requests and diagnostics it still owes; a closed test module's tests from the workspace pull; the code action kinds declared; no edit asked for a rename that Undo makes; Safe Delete of a member whose body has an annotation; Restart Frame after code ran in the stop; the modules a stopped VS Code test run did not reach ended; and no diagnostics for a library source's read-only copy.
222–258: a completion item's documentation on Ctrl+Q in IntelliJ, through public API only; Run to Cursor's temporary breakpoint kept until the program stops;
xtc/busywith the server's open requests and compiler jobs; screen recordings of playbook runs in the container, and tours of both editors composed from passing clips; in VS Code, breakpoints in Ecstasy files, Debug with F5, a run task's args in Gradle and command-line mode,xtc.trace.server, and Run from the Run button and context menu; folding of comments and imports with the compiler adapter; deleted and removed files' diagnostics cleared in workspace pulls; moves that say when they leave uses as they were and that ask again when a change overtook their answer; playbook cases X342–X349 for xunit tests; compiles kept when only private declarations move; and Undo that asks before it takes back a rename or move of several files, shown in both tours.259–275: tours and playbooks that print their progress step by step, with their waits fixed; the debugger probe's waits failing once nothing is in progress for a minute; the unused
xtc/runnableTargetsrequest removed; a class's own child namedInnerthat covers the implicitOuter.Inner, tested in manualTests; hover and Go to Definition in a library copy that the debugger opens; Run All Ecstasy Tests beside Gradle's Tests on mixed test folders; and a run's embedded build compiled again when its files change on disk as it compiles.276: the VS Code extension's npm dev tools past the MSAL, glob and minimatch advisories, with
vscode-languageclient's own minimatch waiting for Release with minimatch 11 to fix GHSA-g3hv-75wg-m249 microsoft/vscode-languageserver-node#1938.The branch was regrouped from its development history on 2026-10-28; errs-693-regroup-2026-10-28.tsv on
lagergren/errsmaps each commit to the commits it came from. Commits 115–276 came fromlagergren/errsfrom 2026-11-04 to 2026-11-09; errs-693-sync-2026-11-04-to-09.tsv gives the errs commits each one carries, as a copy, an adapted copy or a per-feature aggregate.Already on master
Parts of this work have landed on master as pull requests of their own, and this branch is rebased onto them: #699 and #700 (comparison and equality chains, tuple foreach targets), #703 (running a named entry method with arguments and console input), #717 (the lexer at a source's end), #718 (
assert:debugin embedded runs), #720 (weak map arrays), #723 (Nibblefrom its bits), #734 (the temporary module file), #735 (the console debugger'sEwith injected variables), #716 (ending embedded runs, and kills with a pending call), #742 (the caller's javadoc forRuntime's debugger accessors), #724 (a JSON string's\uescapes, and aChar's), #744 (three Dependabot alerts, andvscode-languageclient11.0.0) and #743 (the javadoc errors, with javadoc incheck).Changes
The merge-base comparison contains 945 changed paths: 298 modified, 644 added, 2 renamed and 1 deleted. Of these, 727 are under
lang/and 218 are outside it. 377 changed paths are undersrc/test/, in addition to runtime fixtures and other acceptance assets.javatools/src/main/java/org/xvm/api/andorg/xvm/asm/: compilation outcomes, diagnostic ownership, cancellation, repository read observations, snapshots and ordinary partial progress; and a versioned method-record layout containing only executable code and source information.javatools/src/main/java/org/xvm/compiler/Parser.javaandcompiler/ast/: typed source-tree copying, compilation-owned semantic facts, recovery, cursor fitting, declaration/header analysis and the compiler correctness fixes used by tooling.lang/lsp-server/src/main/kotlin/org/xvm/lsp/adapter/xdk/XdkAdapter.kt: compiler sessions and dependency graphs, semantic queries, incomplete-source support, checked edits, cancellation and resource ownership.lang/lsp-server/src/main/kotlin/org/xvm/lsp/server/XtcTextDocumentService.kt: document synchronization and LSP feature routing, asynchronous work, diagnostics and workspace edits.lang/intellij-plugin/andlang/vscode-extension/: native editor actions, settings and adapter selection, project/compiler-model integration, semantic theme support, lifecycle handling and acceptance harnesses.javatools/src/main/java/org/xvm/runtime/SessionDebugger.javaandPureExpression.java: a runtime debugger that a host drives through calls, beside the console'sDebugConsole, and the interpreter accessors it reads (Frame,Fiber,ServiceContext,Container);Connector.shutdown()lets a finished runtime go.lang/dap-server/,lang/lsp-server/src/main/kotlin/org/xvm/lsp/run/andserver/DebugSessions.kt,EmbeddedRuns.kt,CompiledSources.kt: one DAP session per launch inside the language server, routed to its program's execution worker, with breakpoints mapped to the text the program was built from.lang/vscode-extension/src/debug-adapter.tsandlang/intellij-plugin/src/main/kotlin/org/xtclang/idea/dap/: VS Code's inline debug adapter and IntelliJ's LSP4IJ DAP client, both carrying the session over the language client; the standalonedap-serverlauncher is removed.lang/tree-sitter/build.gradle.kts, the DSL and grammar: native parser build support and the retained syntax adapter/highlighting fallback.plugin/,lang/gradle/compiler-model.init.gradle, shared build logic and CI: evaluated compiler inputs, library/source discovery, test infrastructure and packaged-server checks.gradle/libs.versions.toml: IntelliJ/LSP4IJ versions above, Starter dependencies Kodein 7.26.1, IntelliJ coroutines 1.10.2-intellij-2 and serviceMessages 2024.07, plus a shared XDK library bundle.lang/vscode-extension/package.jsonand lockfile: JSONC/ZIP handling, Playwright-based test support, Node 24 and VS Code 1.140 typings; master's updated ESLint, Mocha and TypeScript-ESLint versions are retained alongside the new test dependencies.Debugging
With the embedded compiler, both editors debug Ecstasy programs: VS Code with F5 or a
launch.jsonconfiguration, IntelliJ with Debug on an Ecstasy Application configuration. A debug session builds and runs the module as Run does, in the same execution workers, under the runtime debuggerSessionDebugger. The editor's DAP messages reach it over the language server's own connection (xtc/debugStart,xtc/debugMessage,xtc/debugEnd), so no second process, port or credentials are needed.exceptionInfo. Breakpoints and stops follow the text the program was built from when a file is edited during the session.toString(), hexadecimal values and identity codes, large arrays a page at a time, Set Value, and inline values beside the code fromtextDocument/inlineValue.IntelliJ checks less where LSP4IJ 0.21.0 lacks the DAP feature. Pause (#1757), exception filter conditions (#1760), loaded sources (#1774), Restart Frame (#1778), function breakpoints (#1780), inline values (#1781), data breakpoints (#1782) and a line breakpoint's hit count (#1787) are merged into LSP4IJ, unreleased. The playbook's IntelliJ checks for them are ready for the release that has them; each case's IntelliJ limitation in the catalog names its fix. Both editors also attach to a program started outside them:
xec --debug listen:127.0.0.1:5005,suspend,agent=<the language server's jar> App.xwaits before its first line for a debugger on this machine, and VS Code's Ecstasy: Attach to Program configuration or IntelliJ's Ecstasy Attach configuration attaches to it, optionally stopping at its first line (X336). Stopping the session detaches, and the program runs on. VS Code's Ecstasy: Copy Option to Debug a Program Outside the Editor copies the option, and IntelliJ's configuration shows it. In Gradle mode, Debug runs the module's Gradle task with the plugin'sxtcDebugandxtcDebugAgentproperties, and the program it starts connects back to the session (X337): VS Code runs the task in a Debug terminal, IntelliJ's Ecstasy Application configuration shows its output in the Debug console, and stopping the session ends the task and the program. With DAP'ssingleThreadoncontinue,next,stepInandstepOut(supportsSingleThreadExecutionRequests), only that thread's fiber runs, with the fibers of other services it calls, while the others stay stopped; when it stops again, at a breakpoint, an exception stop, its step's end or a pause, that is the program's stop again, and if it ends first, the program stops at a waiting fiber with the reasonpause. Embedded runs and Gradle-launched or attached programs take it alike, through the shared worker protocol (24). Neither editor sendssingleThreadyet (microsoft/vscode#166450; LSP4IJ none), so it is checked at the protocol level.To try it, follow the debugging cases X304–X331 in the manual playbook, or the debugging sections of the IntelliJ and VS Code READMEs. The session's messages and capabilities are described in the language server README.
Validation
Fresh runs on this branch's tree passed. They ran on
f7f8620d0c, before #716 and #742 merged.51c0b48aed, commit 70, is the same branch on master with both, and its tree differs only inRuntime.setDebugger()'s javadoc, which is now master's; it compiles, andspotlessCheckpasses. Commit 71's checks follow the table:SessionDebuggerTest's 48 andEmbeddingSupportTest's 30 includedOne language server case, a Debug Console line in a stopped frame, failed once in the full run while the machine's load average was about 100: a value's
toString()went past its one-second limit. It passed when its class was rerun, 54 of 54, and three times on its own. Every commit compiles on its own, as described above.verifyPluginreports the plugin compatible with IntelliJ IDEA 2026.2.3 (262.10968.63); the LSP4IJ DAP descriptor classes the debugger uses are experimental API, which the verifier reports without failing.CI passed on
ee7ac4d9a0, commit 82, with the language server's and the DAP server's tests, as it did onac19f15d8a, commit 78, and37cf6396d9, commit 75; CI passed on28bed8676c, commit 90; CI passed on4be374497f, commit 91, before the rebase onto #724 and #744. Commit 75 stops at an uncaught exception that only the runner would catch: the runner starts the program inside atrywhosecatchcounted as the program's while the runner's fiber was still in the call, which CI's stack trace showed;javatoolspasses 695 (42 skipped). Commits 73, 74, 76 and 77 add the refactorings above and catalog cases X332–X335 (the catalog has 337); onlagergren/errs, whose files they match, the language server passes 2,434 (2 skipped), the IntelliJ plugin 151 and VS Code's headless suite 70, and X332–X335 pass natively in both editors (X335 is VS Code's).Commit 79, attaching, and 80–82 ran on
lagergren/errs, whose files they match:javatoolspasses 702 (42 skipped, none of them the debugger's or the launcher's), the language server 2,442 (2 skipped; its agent tests were rerun, 8 of 8, after a last change to a log message), the DAP server 43, the IntelliJ plugin 151 and VS Code's headless suite 73; X336 passes natively in VS Code and in IntelliJ with LSP4IJ 0.21.0, with no IDE errors. Runningxecfromxdk:installDistwith the server's packaged jar as its agent found that the launcher closed the jar while the agent's thread still loaded classes, which commit 79 fixes. On this branch, commits 79–90 compile and passspotlessCheck. Commits 83–90 ran onlagergren/errs, whose files they match: the IntelliJ plugin passes 154; X74, X259 and X324 pass natively (run-3574220030596104685) and in the container, and X307 passes 3 of 3 in the container, all with LSP4IJ 0.21.0 and no IDE errors.Commits 92–94 ran on
lagergren/errs, whose files they match: the language server passes 2,443 (2 skipped), the IntelliJ plugin 157 and VS Code's headless suite 73. With them, VS Code's playbook passed 337 of the catalog's 338 cases natively (X218 fails on VS Code's Undo order, as before), and IntelliJ's passed in the container every one of the 329 cases it implements, 15 of them with the catalog's partial coverage, with LSP4IJ 0.21.0. On this branch they compile and passspotlessCheck, and CI passed on7c94c7d168, commit 94, on masterdf8e28238d. Rebased onto #743, whosecheckruns javadoc, the branch has no javadoc errors injavatools,javatools_jitbridge,javatools_utilsorjavatools_unicode; CI passed on the tip,5deada5ac1, commit 95, which runs that javadoc.Commit 72 sends the response to a step, continue, pause or restart frame before the
stoppedevent that follows, as DAP orders them; on a loaded CI machine a short step's stop went out first, andEmbeddedExecutionTest's step into a call failed. The DAP server's tests pass, 40 with two new cases that fail without it, andEmbeddedExecutionTestpasses 54 with a real worker.Commit 71,
vscode-languageclient11.0.0, ran in VS Code onlagergren/errs, whose extension is the same: with the workarounds removed on 10.1.2, X272 (a JVM that fails to start) fails with an unhandled rejection; on 11.0.0 without them, X271 and X272 pass three times, the headless suite passes all 70, and the full playbook passes 332 of 333 cases, as on 10.1.2, the one failure being X218, VS Code's own Undo order (microsoft/vscode#344765). On this branch, the extension compiles and passes eslint.The native run and debug cases X31, X131, X280–X289 and X304–X331 ran on
d3aceb5785, whose tree differs from the tip's only in that javadoc: VS Code passed all 40 (run-kLv2zk); IntelliJ, with LSP4IJ 0.21.0, ran the 33 of them implemented there (run-5224751324208668446), 21 passed and 12 partially as the catalog declares (X286–X288, X311, X313–X318, X320 and X323), with no IDE errors.Commits 96–100 ran on
lagergren/errs, whose files they match: the Gradle plugin passes 65 with its TestKit tests (none skipped), the DAP server 45, the language server 2,446 (2 skipped) and the IntelliJ plugin 158; in the playbook container, run with commit 100's tasks, IntelliJ passes X336 and X337 and X303 partially, as the catalog declares, with LSP4IJ 0.21.0, and VS Code passes X303, X336 and X337. X337 fails without commit 98 in VS Code (its breakpoint does not bind) and without commit 99 in IntelliJ (the session ends with the language server). On this branch, the tip compiles with commit 97's-Werror, the VS Code extension compiles, and the plugin's tests pass, 65. Each of commits 96–99 compiles on its own.On 2026-11-02 the branch was rebased onto master
ca51c57bd7(#746–#749). The one conflict was in the VS Code extension'spackage.jsonandpackage-lock.json, in commit 8: master'stypescript-eslint8.72.1, kept with the branch'syauzl. The tree differs from the one before only by those four master commits. The rebased tip,7066762204, passesspotlessCheckand compiles: javatools, the plugin, the language server, the DAP server, the IntelliJ plugin with its integration tests, and the VS Code extension.On 2026-11-09 the branch was rebased onto master
8097b66a89(#759–#762). The one conflict was commit 276's, in the VS Code extension'spackage.jsonandpackage-lock.json, resolved on #762's@vscode/vsce4.1.0 and eslint 10.14.0 with the same changes. The tree differs from the one before only by those four master commits. The rebased tip,ffe34357bb, passesspotlessCheckwith #761's Spotless 8.11.0 and compiles the main and test code of javatools, the plugin, the language server, the DAP server and the IntelliJ plugin; the VS Code extension installs, compiles and passes eslint.Commit 276 ran on
lagergren/errs, whose files it matches: the VS Code extension's headless suite passes 95 and its VSIX builds, and npm audit reports 2 of the 16 vulnerabilities it reported before, both fromvscode-languageclient's minimatch 10. On this branch the extension installs, compiles and passes eslint.Commits 104–275 came from
lagergren/errsfrom 2026-11-03 to 2026-11-07. CI passed onc4f916bf44, commit 114, on6f88d9fd82, commit 193, after the branch was rebased onto master46a5536e1f(#758) without a change to any commit, and onf74fc9ad02, commit 275.Commit 103 ran on
lagergren/errs:SessionDebuggerTestpasses 53 tests, none skipped. On this branch it is a clean cherry-pick, and the class passes there too.Commit 102 ran on
lagergren/errs, whose files it matches: the language server passes 2,449 (2 skipped) andspotlessCheck; without its fallback, its two new assertions fail. On this branch, it is a clean cherry-pick, its main and test code compile, andXdkLinkedEditingTestpasses.Commit 101 ran on
lagergren/errs, whose files it matches:javatoolspasses 706 (42 skipped, as before), the language server 2,448 (2 skipped) and the DAP server 46; its tests continue, step and pause one fiber alone in the runtime, over a real worker and over a real agent, and check that the other fiber's state stays the same. On this branch, it is a clean cherry-pick, and the tip compiles and passesspotlessCheck.Known follow-ups
Try it
Keyboard shortcuts, logs and server restart
Both editors use two-step shortcuts: press Control+Option+X on macOS (Ctrl+Alt+X on Windows/Linux), release the keys, then press L or A. On macOS this is Control, not Command. Custom keymaps may override these defaults.
The restart and export actions have no plugin-defined keyboard shortcut; assign one in the editor's Keymap / Keyboard Shortcuts if desired. Open VS Code's Command Palette with Command+Shift+P on macOS or Ctrl+Shift+P on Windows/Linux. The log toggle retains history while hidden; use it directly if an error notification's Show Logs link does not bring the IntelliJ tool window forward.
For a terminal-controlled restart, run from this checkout with Python 3 installed:
The plugins also bundle this CLI as
bin/xtc-lsp. The project must be open in an editor running the updated plugin; for IntelliJ, open an Ecstasy file at least once to start its server. If multiple sessions match, select one using--session <id>fromlist. Restart goes through the owning editor, restores unsaved buffers without saving them, and remains available after a language-server crash. It does not require restarting the IDE or sending a process signal. Installing the updated plugin into an already-running IDE requires the usual one-time editor reload/restart first.See the IntelliJ controls and VS Code controls for settings and shortcut customization.
Run the native editor playbooks
The manual playbook on this branch contains the launch instructions, copyable demo programs, scenario actions and expected results. Use it to manually explore any feature; the shared scenario catalog contains additional source variants and per-case manual notes.
From the repository root, run the full native suites one at a time on a graphical desktop:
Use JDK 25 or newer to start Gradle. Dependencies and isolated IDE profiles are prepared by the build. To keep the test IDEs off the desktop, run the playbooks in a Linux container on a virtual display instead:
./gradlew containerPlaybookBuild, then./gradlew containerPlaybook -PplaybookCases=X1,X2(both editors; all cases without the property), orcontainerPlaybookIntellij/containerPlaybookVsCode. They usedocker, or the command-Porg.xtclang.docker.command=podmannames. VS Code can usexvfb-runon headless Linux. Leave the test window to the harness; manual interaction can change the active file and invalidate a case.For a short selection covering structure, diagnostics, hover and typed completion:
./gradlew :lang:intellij-plugin:testCompilerPlaybook \ --tests '*CompilerPlaybookTest.compilerPlaybook' \ -PincludeBuildLang=true -PincludeBuildAttachLang=true -Plsp.adapter=compiler \ -PintellijPlaybookCases=X1,X2,X3,X6 --rerun --no-build-cache ./gradlew :lang:vscode-extension:testCompilerPlaybook \ -PincludeBuildLang=true -PincludeBuildAttachLang=true -Plsp.adapter=compiler \ -PcompilerPlaybookCases=X1,X2,X3,X6Replace the IDs with the cases you want to examine. The IntelliJ method filter limits this selection to the feature session, and the selected VS Code task does not schedule the host regression suites. These selected runs do not establish whole-catalog acceptance.
Reports are written to
lang/intellij-plugin/build/reports/compiler-playbook/run-*/andlang/vscode-extension/build/reports/compiler-playbook/run-*/; VS Code also writeslatest-run.txt. Check per-case results, selected/excluded cases, errors and the recorded revision. The acceptance instructions explain logs, coverage limits and expected negative-test notifications.Explore the demo programs manually
To try the product:
Check out this PR and launch either editor from the repository root; run native editor sessions sequentially because their actions use desktop focus.
Open an Ecstasy module, introduce and repair an error without saving, then try hover, completion, references and rename; copy the named demo programs from the manual walkthrough, preserving their filenames and module layout, then follow the case actions and expected results.
Switch between Compiler and Tree-sitter using Tools → Switch Ecstasy Language Adapter in IntelliJ or Ecstasy: Switch Language Adapter in VS Code; confirm that the restarted server restores the unsaved buffers.
Use the native acceptance commands and report instructions when recording a review finding, including the scenario ID and the actual editor/server logs.