Problem
Find References narrows the files it searches by checking explicit imports. This works for ordinary classes because a file must import the class before using it.
Classes from Prim, such as Partial, are available in every module without an import. The import check therefore cannot identify which files may reference them. A request on Partial can find references in the current file but omit matching references in other workspace files, including instance declarations.
Possible approaches
- Search every active file when the target is defined in
Prim.
- Maintain an index that maps resolved declarations to the files that reference them.
Searching every active file is the simpler approach. It may also return valid references from built-in Prim.* modules, so the expected user-facing scope should be decided before implementation.
Scope
This is a general limitation of cross-file reference search for implicitly available Prim declarations. It is separate from locating class names inside instance declarations.
Problem
Find References narrows the files it searches by checking explicit imports. This works for ordinary classes because a file must import the class before using it.
Classes from
Prim, such asPartial, are available in every module without an import. The import check therefore cannot identify which files may reference them. A request onPartialcan find references in the current file but omit matching references in other workspace files, including instance declarations.Possible approaches
Prim.Searching every active file is the simpler approach. It may also return valid references from built-in
Prim.*modules, so the expected user-facing scope should be decided before implementation.Scope
This is a general limitation of cross-file reference search for implicitly available
Primdeclarations. It is separate from locating class names inside instance declarations.