Skip to content

mcpp-language-server 0.0.9: completion on projects without modules as fast as plain clangd's, settings that show, xmake downloads that say what they need (#37) - #38

Merged
Sunrisepeak merged 21 commits into
mainfrom
release/0.0.9
Oct 1, 2026
Merged

Sunrisepeak merged 21 commits into
mainfrom
release/0.0.9

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Owner

mcpp-language-server 0.0.9: completion on projects without modules as fast as plain clangd's, and the rest of #37.

Plan, evidence and implementation record: .agents/docs/2026-10-01-0.0.9-plan.md. Upstream defects UP-22 and UP-23 are registered in #24; LLVM issue drafts are in .agents/docs/2026-10-01-0.0.9-upstream-drafts.md.

Completion and diagnostics (W-1, W-2)

  • WA-CLANGD-009: clangd's --experimental-modules-support rescans a file's module dependencies on every completion (UP-23).
    • On vulkan-hpp the cost was 82 → 254 ms at the median and 869 ms at worst, in sources and headers alike.
    • A project whose plan uses no modules now gets clangd without the flag. The verdict is kept per workspace, and the first plan that uses modules restarts clangd with it.
    • Through mcppls, completion went from 259 to 97 ms.
    • The ux-heavy-headers scenario holds it to 1.3 × clangd's own time + 30 ms. With the workaround off it fails: 530 ms against 56 ms.
  • WA-CLANGD-010: clang-tidy 23.1's misc-const-correctness says a filter, drop_while, chunk_by or split view can be const (UP-22, the body of False warning of constness #37). Such a variable would not compile as const.
    • The diagnostic is dropped when the view, or one it is built on, has no const begin(). A ref_view stops the walk.
    • True positives stay.

Settings (S-1..S-4)

  • The two renames:
    • mcppls.engine → mcppls.engine.name
    • mcppls.buildDiscovery → mcppls.buildDiscovery.mode
  • Why: they were scalar parents of other settings, so VS Code dropped their children's defaults. engine.workers showed undefined and "Value must match regex".
  • Migration: the old names stay aliases on the server and are read by the extension. VS Code offers once to move a person's values, and writes nothing without the click.
  • Other fixes:
    • engine.workers now reaches the server.
    • null means unset.
    • New tests: no contributed key is a scalar's child; every pattern has a matching default and an error message.

Build tools (D-1..D-6)

  • D-1: xmake: only the xmake.conf keys xmake f --help lists are passed on. Keys xmake wrote itself (proxy, dotnet) made every start fail once and show a wrong notice.
  • D-2:
    • An online install that fails is producer-install-failed, with xmake's error lines and install log.
    • askOnline is offered only for an offline run.
  • D-3: the message names build tools and the system package manager. False warning of constness #37's libtool and libpthread-stubs came from building libsdl3 from source.
  • D-4: "Always Download in This Workspace" fetches what is needed without asking, and can be taken back. The build tool stays offline otherwise, and nothing is written into the project.
  • D-5: the status says how a fetch ended (S3 onlineRun, S3-4-26..28), and VS Code tells it once.
  • D-6: xmake project's missing packages are recognized too.
  • Test: fixture xmake-needs-download, run against a stand-in xmake.

Starting (P-1..P-3)

  • P-1:
    • A second instance plans with the owner's cached model. False warning of constness #37's bundle showed 3–4.4 s of slow first requests and a clangd restart.
    • A server whose client process is gone exits. This needs processId from initialize, and Linux or macOS.
  • P-2: clangd waits up to 1.2 × a build tool's last time, at most 5.5 s more, instead of starting on scanned sources and restarting.
  • P-3: the old clangd is stopped off the event loop on restart. It takes 2.4–3.9 s to exit mid-preamble, and the loop waited for it: 446 ms and 1803 ms in False warning of constness #37's logs.

Measurement and packaging

  • M-1: the report splits engine time from mcppls's overhead per method.
  • M-3:
    • The conformance runner gets clangd-lsp (clangd driven directly) and completion-baseline.
    • Canaries for WA-009 and WA-010.
    • Fixtures no-modules and tidy-const-views.
  • R-2: a payload is dirty only when a tracked file differs. CI's untracked build outputs marked every release dirty.

Co-authored-by: speak-agent 248744407+speak-agent@users.noreply.github.com

Sunrisepeak and others added 21 commits October 1, 2026 21:00
…a project that uses none, WA-CLANGD-010 drops clang-tidy's const advice on a view without a const begin(); version 0.0.9

Issue #37. UP-22 and UP-23 are registered in issue #24. The plan is .agents/docs/2026-10-01-0.0.9-plan.md.
…mode replace the parent keys that hid their children, engine.workers reaches the server, null means unset, and tests keep it so

Co-Authored-By: speak-agent <speak-agent@users.noreply.github.com>
…econd instance plans with the owner's cached model; P-2 clangd waits for a build tool known to answer soon
…loop, so requests and watchdogs no longer wait up to 2.5 s for it
…en fetched without asking; D-5 the outcome of a fetch is told once
…o the engine's and the server's (engineP50Ms, engineP95Ms, overheadP50Ms, overheadP95Ms)
…SP, no-modules, tidy-const-views and ux-heavy-headers fixtures, clangd-lsp and completion-baseline checks, prepare heavy-headers
…download is needed, report a failed install as such

D-1 asks xmake f --help which options it takes (kept per xmake and xmake.lua) and skips the keys xmake wrote for itself;
D-2 splits the offline needs-download from producer-install-failed and offers askOnline only for an offline run;
D-3 words the offline message (build tools, system package manager); D-6 reads missing packages from the xmake project stage too.
Conformance xmake-needs-download runs a stand-in xmake (server-path-prepend, write-file notify).
…et go of, a cache clear and shutdown wait for it, the verdict is written again after a clear, xmake's help is asked again when an included xmake.lua changes, and a sub-setting alone is no old setting
… or directory VS Code still holds (ENOTEMPTY, EPERM)
…fore holding their lines (a Windows runner read the set published before clangd built the file)
…tarts exactly one, an old setting in the user's scope applies under a workspace that set only a sub-setting; 0.0.9 is dated 2026-10-02
@Sunrisepeak
Sunrisepeak merged commit b3fc201 into main Oct 1, 2026
62 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