Skip to content

Scope-first FAR/rename: derive the candidate file set from the declaration's scope instead of iterating solution files #316

Description

@msarson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions