docs(language-server): spec for lazy document state + pull diagnostics#887
Draft
SevInf wants to merge 1 commit into
Draft
docs(language-server): spec for lazy document state + pull diagnostics#887SevInf wants to merge 1 commit into
SevInf wants to merge 1 commit into
Conversation
Signed-off-by: Serhii Tatarintsev <tatarintsev@prisma.io>
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Specification-only PR for the
lsp-document-stateproject. No implementation here — this commits the Drive project artifacts (spec, plan, slice spec) so the design can be reviewed before any code lands.What this is
A settled design for reworking the language server's document-state lifecycle from eager, defensive reparse to invalidate-on-change + lazily materialize-on-read, synchronously, plus a move from push to pull diagnostics.
Why
publish+currentDocumentArtifactper-request reparse with a whole-document text compare) to dodge a stale-buffer race the LSP spec says we should not have to fight.prisma-next.config.ts, evaluated via dynamic import); parse/derive stays synchronous so a derived result is always internally consistent for one version.Scope
lazy-state-and-pull-diagnostics(lazy lifecycle + pull diagnostics ship together — dropping eager compute requires the pull transport to exist).TextDocumentsis kept (demoted to text mirror / lifecycle / version source).{ interFileDependencies: false, workspaceDiagnostics: false }with an honest scope-comment; the multi-input table flip is deferred.Non-goals
Removing
TextDocuments, the multi-input symbol table, multi-project membership, and any behavioural changes to completion/semantic-tokens/folding. Seeprojects/lsp-document-state/spec.md§ Non-goals.Sequencing
Stacked on
lsp-autocomplete(#871); base islsp-autocomplete, notmain. Merges after #871.Artifacts
projects/lsp-document-state/spec.mdprojects/lsp-document-state/plan.mdprojects/lsp-document-state/slices/lazy-state-and-pull-diagnostics/spec.md