Skip to content

mcppls-clangd 0.0.12: declared directive recovery and const-view fixes; workers tolerate an unbuilt command directory - #3

Merged
Sunrisepeak merged 4 commits into
mainfrom
release/0.0.12-features
Oct 9, 2026
Merged

Sunrisepeak merged 4 commits into
mainfrom
release/0.0.12-features

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

The 0.0.12 engine fixes two upstream defects that mcpp-language-server still works around: WA-CLANGD-001 (import hello. hangs the file, UP-01) and WA-CLANGD-010 (misc-const-correctness suggests const for a view whose const begin() is not viable, UP-22). The product retires a workaround only when the engine's verified identity declares the fix, so engine.json now declares module-directive-recovery and const-correctness-views.

Each feature is proved on the final package bytes, the same way the existing three are:

  • the in-tree module-directive-recovery.test LSP session must answer every request. Locally, stock clangd 23.1 times out after 20 s with no answer, and this engine answers all four.
  • ci/const_views_canary.py uses a self-contained view with a constrained const begin() and must report only its positive control. Locally, stock clangd 23.1 reports View and Plain, and this engine reports only Plain.

No LLVM code changes, so the patched tree and the binaries are the same as #2. The v0.0.12 release is re-cut from this commit so that the product pins an engine that declares these features.

Worker fix found by the product conformance run. On Linux the module worker treated a command directory that does not exist yet as fatal. mcpp's standard-library unit names its not-yet-created build cache, so in mcpp-language-server's mcpp-emit-package-std fixture std and every importer failed to build (module worker failed: No such file or directory). With stock clangd's in-process build the same fixture passes. The worker now does what ThreadsafeFS::view does: it reports VFS: failed to set CWD and goes on. A PrerequisiteModulesTests case covers it. The patched tree is now dfe2f25a…, and only 0017 (code + test) and 0025 (test) differ from the regrouped series.

…correctness, proved on its final bytes

mcpp-language-server keeps two workarounds for defects this series fixes:
WA-CLANGD-001 (a file with `import hello.` never finishes, UP-01) and
WA-CLANGD-010 (misc-const-correctness suggests const for a view whose const
begin() is not viable, UP-22). It retires a workaround for an engine only when
the engine's verified identity declares the fix, as it already does for
module-directive-diagnostic-ranges. engine.json now declares
module-directive-recovery and const-correctness-views, each proved on the final
package bytes: the in-tree module-directive-recovery lit session must answer
(stock clangd 23.1 hangs on it), and ci/const_views_canary.py, a self-contained
view with a constrained const begin(), must report only its positive control
(stock clangd 23.1 also reports the view).
…exist yet

mcpp-language-server's mcpp-emit-package-std fixture showed it: mcpp names the
standard library unit's command directory in its build cache, which does not
exist before the first build. The Linux module worker returned the failed
VFS::setCurrentWorkingDirectory as an error, so std and every importer of it
failed to build ("module worker failed: No such file or directory"), where
stock clangd's in-process build reports "VFS: failed to set CWD" and goes on.
The worker now does what ThreadsafeFS::view does; a PrerequisiteModulesTests
case builds a module from a request whose directory is missing.
@Sunrisepeak Sunrisepeak changed the title mcppls-clangd 0.0.12: the engine declares directive recovery and const-view correctness mcppls-clangd 0.0.12: declared directive recovery and const-view fixes; workers tolerate an unbuilt command directory Oct 9, 2026
…ot exist

getFullPath() asserts the file it names exists; the unbuilt command directory
is the one path the case needs to be missing.
The first build-test on main after the 0.0.12 merge had no floor cache in its
scope and was cancelled at 90 minutes; a cold Ubuntu 20.04 build of clang and
clangd takes about three hours on a hosted runner.
@Sunrisepeak
Sunrisepeak merged commit 9a4e4c5 into main Oct 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant