Update includes when files are renamed

The server advertises willRename and answers workspace/willRenameFiles
with a WorkspaceEdit. A bounded core resolves quoted includes against
the document directory and replaces only the spelling (relative stays
relative, absolute stays absolute, angle includes untouched), with
registered tests. EditorDiagnostics converts the byte edits to
negotiated positions for every open overlay; a real stdio session
returned the extra.hpp -> renamed.hpp edit.
This commit is contained in:
faumaray committed 2026-12-05 16:19:52 +03:00
1 parent 158125ace5
commit b0b48d961c
12 files changed
+277 -5

No files matched your search

+1
View File
@@ -23,6 +23,7 @@ missing part. Updated December 5, 2026 after semantic tokens and inlay hints.
| textDocument/inlayHint (parameter types) | `vls_feature_tests`, real stdio session |
| workspace/symbol | stock occurrence corpus |
| workspace fileOperations (didCreate/didRename/didDelete) | `vls_feature_tests`, real stdio session |
| workspace/willRenameFiles (include updates) | `vls_feature_tests`, real stdio session |
| voidLanguageServer/analysisStatus, providerStatus | stdio corpora |
| Debug adapter (DAP) separately through `vls-dap` | `vls_live_tests`, `vls_dap_tests` |
+1 -1
View File
@@ -102,7 +102,7 @@ ingests occurrence facts after each analysis and the server answers
Hash.hpp definition through it. Real persistence migrations and cross-file
rename coverage remain open.
Index-backed completion (roadmap 14 first slice) is implemented: `include/vls/features/Completion.hpp`, `src/features/Completion.cpp` and registered `vls_feature_tests` cover prefix extraction, filtering with replacement ranges, label+kind deduplication, deterministic ranking and bounds. `Server.cpp` advertises `completionProvider` and answers `textDocument/completion` from the symbol index through `EditorDiagnostics::completion`; a real stdio session with the stock observer returned `fnv1a64` and `fnv1a64_update` at a real call site. Every result is marked incomplete because the index does not prove visibility. Signature help is now served from the compiler-provided occurrence signature (parameter labels and ranges, active parameter, innermost call selection) and advertised by the server. Document symbols are served from the index by path and document highlights from same-binding occurrence facts; both are advertised and were exercised over stdio with the stock observer. Selection and folding ranges are served from immutable document snapshots with registered bounded cores. Code actions now offer the compiler's own suggested fixes (quickfix) from retained published diagnostics, with SARIF fix decoding bound to the owner snapshot. Semantic tokens encode the proven call occurrences with a bounded one-type legend. Inlay hints project parameter types from the occurrence signature at each argument start. Workspace file-operation notifications invalidate dependent index contexts and re-queue open documents. Compiler-native completion with visibility proof and deferred detail resolution remain open.
Index-backed completion (roadmap 14 first slice) is implemented: `include/vls/features/Completion.hpp`, `src/features/Completion.cpp` and registered `vls_feature_tests` cover prefix extraction, filtering with replacement ranges, label+kind deduplication, deterministic ranking and bounds. `Server.cpp` advertises `completionProvider` and answers `textDocument/completion` from the symbol index through `EditorDiagnostics::completion`; a real stdio session with the stock observer returned `fnv1a64` and `fnv1a64_update` at a real call site. Every result is marked incomplete because the index does not prove visibility. Signature help is now served from the compiler-provided occurrence signature (parameter labels and ranges, active parameter, innermost call selection) and advertised by the server. Document symbols are served from the index by path and document highlights from same-binding occurrence facts; both are advertised and were exercised over stdio with the stock observer. Selection and folding ranges are served from immutable document snapshots with registered bounded cores. Code actions now offer the compiler's own suggested fixes (quickfix) from retained published diagnostics, with SARIF fix decoding bound to the owner snapshot. Semantic tokens encode the proven call occurrences with a bounded one-type legend. Inlay hints project parameter types from the occurrence signature at each argument start. Workspace file-operation notifications invalidate dependent index contexts and re-queue open documents. A will-rename request returns the include updates for open documents. Compiler-native completion with visibility proof and deferred detail resolution remain open.
The reflection provenance representation (roadmap 12 first slice) is
implemented as a bounded library with a registered suite: innermost-first
+19
View File
@@ -79,6 +79,25 @@ the upgraded snapshot (keeping `snapshot.prev.json`) and rewrites a legacy
about 25-30s in a Debug build (it passed VBS at ~27s); the full CMake run then
passed 18/18.
## December 5 include updates on file rename
`include/vls/features/IncludeUpdate.hpp` finds quoted include directives that
resolve from the document's directory to a renamed path and returns byte-offset
edits replacing only the spelling (relative stays relative, `./` is preserved,
absolute stays absolute; angle includes are never touched because their search
roots are unknown), with registered `vls_feature_tests` cases. The server
advertises `willRename` alongside the other file operations and answers
`workspace/willRenameFiles` through `EditorDiagnostics::renamed_files`, which
converts the edits to negotiated positions with each open overlay.
Real stdio session: renaming `extra.hpp` to `renamed.hpp` while `main.cpp`
includes it returned
```
willRenameFiles: {"changes": {"file:///.../main.cpp": [{"newText": "renamed.hpp",
"range": {"end": {"character": 19, "line": 0}, "start": {"character": 10, "line": 0}}}]}}
```
All 18 native suites and all 18 CMake tests passed.
## December 5 workspace file operations
The server advertises `workspace.fileOperations` (`didCreate`, `didRename`,