Code reference detail
reqlan-neighbor-parse.ts
reqlan rq/extension/language/support/packages/language/src/reqlan-neighbor-parse.ts
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| ast_lifecycle | done | The open buffer has one model. That model is the Rust parse of this buffer. [local_symbolic_analysis] is a file-local extract. The hot path does not run it as a second parse. Related: [open_file_algorithm], [open_file_sequence_diagram], [outbound_one_hop], [token_colour_sequence], [parse_budget_timeout], ["./initialisation-and-sequencing.rq".lsp_file_watch], [language_server_rust]. Populate. Parse this buffer when the editor opens it. Semantic tokens, same-file links, and the import list come from that parse. Replace. When this buffer text changes, parse again and replace the model. Do not patch the old model. A watched `.rq` change uses the same replace path ( [document_update_handler] ). When the text is unchanged, keep the current model. Drop. When the editor closes the buffer, drop the model. A closed file keeps no syntax tree ( [language_server_rust] ). Import files. [outbound_one_hop] stores a name list for each imported file. That list is not an open-buffer model. A change to an imported file does not replace this buffer's model. Read the imported file again when its content hash changes. Incomplete parse. When the budget fails, store an empty model plus diagnostics ( [parse_budget_timeout] ). Idea names stay empty until a later successful parse. The node engine follows [node_engine_open_path]. | 0.249 | |
| native_cache_retention | done | The language server keeps the open-buffer model for each open editor. It keeps a depth-1 name list for each imported file, and for each qualified-reference file the background pass has confirmed, while an open editor still needs that list. A closed editor drops its model. It also drops name lists that no open editor still needs. A file-watcher delete drops that URI from both caches. A check of a closed file may parse it once. That result is not stored. Related: [open_file_hot_path], [outbound_one_hop], [ast_lifecycle]. | 0.072 | |
| open_file_hot_path | in-progress | Open-file work stays on the one parse of this buffer plus one parse per imported file. Reuse that model for document links, go-to-definition, hover, and diagnostics until the text or the import-root mapping changes. Keep that model, and the import name lists, only for open editors ( [native_cache_retention] ). Look up an open import by URI. Do not match on file basename. Do not read SQLite. Do not call `list_all_ideas`. At parse time, publish lex and parse diagnostics with same-file and import errors. The editor must not wait for a workspace link phase to see a broken parse. Handlers on this path read the open model. They do not build a workspace link graph. Related: [open_file_algorithm], [outbound_one_hop], [ast_lifecycle], [comment_backlink_sequence]. | 0.186 | |
| outbound_one_hop | done | The hot path parses imported files only. For each import in the open buffer, parse that file once, then stop. Read idea names, idea lines, and import aliases. Do not parse files that the import references. Do not read SQLite. Prefer the open buffer text when that import is already open and dirty. Cache each parse by path plus file stamp ( modified time and size ) ( [lsp_session] ). A current stamp is one `stat`. Read and parse the file only when the stamp changed. Cache the open buffer by URI plus text fingerprint ( [open_file_hot_path] ). [local_symbolic_analysis] stays file-local. This hop is outside that extract. An extensionless import path prefers `.rq`, then the path as written ( [implicit_file_extension] ). A qualified reference that is not an import waits for [lazy_features_after_outbound]. Related: [open_file_algorithm], [non_web_reference_navigation]. | 0.246 |
Reference labels
ast_lifecycle, native_cache_retention, open_file_hot_path, outbound_one_hop