Repository navigation
mcppls-clangd 0.0.12: preambles kept for files mixing headers with imports; typing, edits and lost BMIs do not wait on module rebuilds - #4
Merged
Conversation
… and a changed stable payload is skipped
Two defects the product's ux scenarios found on four cores (ux-xlings), each
folded into the patch it belongs to:
- 0025: completion compared the draft's imports with the preamble's and, when
they differed, rebuilt the whole prerequisite set inside the request. Typing
an import line changes the draft's imports at every key, so every completion
there rebuilt about 94 modules (0.8-2.5 s each, against 5-80 ms with stock
clangd). Completion inside the preamble region parses the draft alone,
without the preamble or what its modules export, so their freshness is not
checked there; completion below the imports keeps the refresh. A
PrerequisiteModulesTests case asserts no prerequisite lookup in an import
line and module exports in the body.
- 0019: ModuleBuildCache::lookup failed the module ("stable payload changed")
when a stable generation's payload no longer matched its record, so a BMI
truncated by a crash or another program failed that module and every
importer until the cache was reset (ux U9 waited 122 s; U11 found nothing to
rebuild). Such a generation is now skipped like one that fails validation,
the module builds into a new generation, and the old one keeps its charge
until bounded collection.
…t hold, skips the module refresh too
…ackage proves unresolved-import-recovery
…othing builds, and waits 250 ms for a rebuild it needs
…n; only an edited dependency's rebuild is bounded
…ntegration run; a soak check waits for the kill
…oized, and the first input that replays differently is logged
…xing headers with imports keep their preamble
…whether a file has a buildable import
…ized on every host, so Windows and macOS files mixing headers with imports keep their preamble
… memoized preamble plus the body's imports
…ich typing changes during the build
…ead of failing every build
…draft does not invalidate the scans that walked its folder
…ublished, so its admission meets pressure
…importers, instead of rebuilding every one
… set dropped for a moment is not copied again
…ot the paths they were published to
…ads replay unchanged, whatever key another scan of its prefix gets
…preamble stale, and clangd logs it
… textual preamble proof is documented where it is declared
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Engine fixes found by running mcpp-language-server's conformance and ux scenarios against the maintained engine and against stock clangd 23.1. The scenarios were ux-xlings and ux-mcpp on four cores, typing-import under PRoot on two cores, and new Qt and
<windows.h>module fixtures. Each fix is folded into the patch it belongs to;patches/PATCHES.mdlists them per patch.Files mixing heavy headers with module imports keep their preamble (0014, 0023).
<windows.h>and imports modules was parsed in full for every request.clang++.cfg(xlings/mcpp LLVM) and every non-Linux host.PrecompiledPreamble::CanReusefound changed (new optional reason out-parameter).Typing does not wait on module rebuilds (0014, 0025).
The owned module cache (0019, 0021).
Robustness.
unresolved-import-recovery(ci/unresolved_import_canary.py). Stock 23.1 gives no answer within 60 s; this engine answers in 77 ms.CI. Every platform's PR build is packaged as
clangd-<platform>-portable. mcpp-language-server PR #46 tests these packages before this PR merges (see the README, "Integrating with mcppls").Patched tree:
3e8bb5b0.