reqlanOverviewIdeasFilesCode filesClustersAttributesGraphPrint

Printable idea sheet

node_engine_open_path

reqlan rq/extension/language/support/open-file-sequencing.rq:351

Katz 0.133

This idea applies when `reqlan.languageServer.engine` is `node`.
The default engine is language_server_rust.
The node server populates a Langium AST for the open buffer at `DocumentState.Parsed`.
Later builder phases attach scopes, links, and diagnostics. They must not replace that AST.
Parsed-time handlers must not read Langium `.ref`.
Use `$refText`, the symbolic extract, or `peekResolvedRef` until `ComputedScopes`.
The linker must not resolve a cross-reference while that document is below `ComputedScopes`.
Do not log the Langium warning. Do not store a failed link.
Scope lookup, code lens, completion, and idea summaries use `readResolvedRef` or `peekResolvedRef` until that phase.
When another `.rq` file changes, relink this document when the index says it is affected,
when comment references name that file, or when this document's outbound targets include the changed URI.
Do not relink every document that still has a linker error.
Workspace load parses at most 8 files at a time ( workspace_parse_concurrency ).
`fileIdeasCache` and `importPathCache` drop a URI when that document is removed ( scope_cache_release ).
Related: open_file_algorithm, ast_lifecycle.

implementation
reqlan-document-factory.ts, reqlan-document-builder.ts, reqlan-async-parser.ts, reqlan-parse-budget.ts, reqlan-workspace-manager.ts, reqlan-scope.ts, reqlan-local-symbolic-links.ts, reqlan-neighbor-parse.ts, reqlan-outbound-presentation.ts, reqlan-document-link-provider.ts, main.ts, reqlan-linker.ts, reqlan-reference-peek.ts
status
done
tests
ast-lifecycle.test.ts:populates the Langium AST at Parsed without DocumentBuilder, ast-lifecycle.test.ts:linking and validation do not replace the AST, ast-lifecycle.test.ts:neighbor hop does not populate a Langium AST, parsed-reference-sequencing.test.ts:definition hover highlight and links do not resolve refs before ComputedScopes, parsed-reference-sequencing.test.ts:reading every ref before ComputedScopes does not warn and linking still works, open-file-hot-path.test.ts:does not relink an unrelated file that still has linker errors, open-file-hot-path.test.ts:relinks a host when its neighbor file changes

Interactive page: node_engine_open_path