Proposed by Mark during the #315 investigation: rather than collecting a broad file list and scanning/filtering, FAR should start from the current file, resolve the symbol's declaration and its SCOPE, and let Clarion's scope model dictate which files can possibly hold references.
Scope table (each row to be docs-verified and pinned):
| Declaration site |
Reference universe |
| Routine-local / procedure-local |
current file only |
| Module data in a MEMBER file |
current file only |
| Global data in the PROGRAM file |
program + MEMBER family (FRG) |
| MAP / MAP-include procedure |
program family |
| INC-declared shared class / global |
reverse-INCLUDE set (FRG), pruned by the reference index's per-file word counts |
#315 already shipped several rows as targeted patches inside ReferencesProvider (program-family widening for program-file cursors, file-local class scoping, mayContain word-prune, frontier-pruned class-family walk). This issue is the structural version: one scope → candidate set resolver consumed by FAR, RenameProvider, and document highlight, replacing the per-route file-list assembly.
Substrates already in place: FileRelationshipGraph (MEMBER/INCLUDE/MODULE edges, persisted), ReferenceCountIndex (per-file word counts, mtime-verified), ScopeTypeIndexService (tiered declaration lookup).
Risks to manage:
Post-1.0. Raised from the #315 thread.
Proposed by Mark during the #315 investigation: rather than collecting a broad file list and scanning/filtering, FAR should start from the current file, resolve the symbol's declaration and its SCOPE, and let Clarion's scope model dictate which files can possibly hold references.
Scope table (each row to be docs-verified and pinned):
#315 already shipped several rows as targeted patches inside ReferencesProvider (program-family widening for program-file cursors, file-local class scoping, mayContain word-prune, frontier-pruned class-family walk). This issue is the structural version: one
scope → candidate setresolver consumed by FAR, RenameProvider, and document highlight, replacing the per-route file-list assembly.Substrates already in place: FileRelationshipGraph (MEMBER/INCLUDE/MODULE edges, persisted), ReferenceCountIndex (per-file word counts, mtime-verified), ScopeTypeIndexService (tiered declaration lookup).
Risks to manage:
Post-1.0. Raised from the #315 thread.