Handle workspace file-operation notifications

The server advertises didCreate/didRename/didDelete file operations
with file-scheme filters. A bounded core converts notifications into
canonical filesystem changes (rename as old-gone/new-present, non-file
URIs ignored, invalid URIs rejected) with registered tests, and
EditorDiagnostics invalidates every dependent index context for
changed or removed paths before re-queueing open documents. A real
stdio session observed the index become incomplete after a deleted
header, and a malformed notification left the server answering.
This commit is contained in:
faumaray committed 2026-12-05 16:03:06 +03:00
1 parent 130cb57a7f
commit 158125ace5
12 files changed
+248 -12

No files matched your search

+5 -4
View File
@@ -22,6 +22,7 @@ missing part. Updated December 5, 2026 after semantic tokens and inlay hints.
| textDocument/semanticTokens/full | `vls_feature_tests`, real stdio session |
| 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 |
| voidLanguageServer/analysisStatus, providerStatus | stdio corpora |
| Debug adapter (DAP) separately through `vls-dap` | `vls_live_tests`, `vls_dap_tests` |
@@ -34,7 +35,7 @@ missing part. Updated December 5, 2026 after semantic tokens and inlay hints.
| textDocument/formatting | needs a plan |
| callHierarchy / typeHierarchy | needs compiler call/type relationships |
| textDocument/codeLens, executeCommand | command surface not designed |
| workspace edits and file operations | client-side application is also open |
| Client-side application of server-issued workspace edits | rename and code actions return edits the clients apply directly |
| Applying multi-file renames through client buffers | plans can be ready; application is client work |
| `EditorDiagnostics` reflection LSP wiring | the server has no reflection data source |
| semantic token modifiers / richer token types | legend is one type (`function`) from occurrences |
@@ -42,6 +43,6 @@ missing part. Updated December 5, 2026 after semantic tokens and inlay hints.
## Next slices
1. `workspace/applyEdit` and client-side application of ready rename plans.
2. call hierarchy from stock call facts.
3. Formatting via the selected compiler.
1. call hierarchy from stock call facts.
2. Formatting via the selected compiler.
3. code lens and executeCommand.
+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. 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. 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
+18
View File
@@ -79,6 +79,24 @@ 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 workspace file operations
The server advertises `workspace.fileOperations` (`didCreate`, `didRename`,
`didDelete`) with file-scheme filters. `include/vls/features/FileOperations.hpp`
converts notifications into canonical filesystem changes (rename yields the old
path gone and the new path present; non-file URIs are counted as ignored;
invalid URIs reject the notification) with registered `vls_feature_tests`
cases. `EditorDiagnostics::files_changed` invalidates every dependent index
context for changed or removed paths (clearing an overlay for removed files) and
the editor re-queues open documents.
A real stdio session with a temporary workspace whose `main.cpp` includes
`extra.hpp`: before deletion `ready` with `index {'complete': True, 'records': 1}`;
after deleting the header and sending `workspace/didDeleteFiles` the analysis
re-ran to `partial` with `index {'complete': False, 'records': 0}`, and a
malformed rename notification left the server answering. All 18 native suites
and all 18 CMake tests passed.
## December 5 inlay hints from occurrence signatures
`include/vls/features/InlayHints.hpp` finds the top-level argument starts of a