Skip to content

Implement cross-file effect resolution#1344

Open
lionel- wants to merge 2 commits into
oak-nse/5-eager-attachfrom
oak-nse/6-resolver
Open

Implement cross-file effect resolution#1344
lionel- wants to merge 2 commits into
oak-nse/5-eager-attachfrom
oak-nse/6-resolver

Conversation

@lionel-

@lionel- lionel- commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Progress towards #1338
Branched from #1343

This PR ties effects support together. SalsaImportsResolver::resolve_effects() now resolves the effects of a function call in exactly the way the definition side resolves a name, with import-layer chains.

Shadowing is export-driven: a layer that binds the name but carries no effect (a plain export, a sibling definition, a namespace import) still shadows any deeper effect. If a library(evil) overwrites source(), library(), or assign(), the effects (or absence thereof) from evil exports win.

To avoid Salsa cycles, effect resolution always uses the eager (predecessors-only) collation view, even for a lazy callee. If a later sibling shadows effects in a lazy call, we'll emit a diagnostic instead (NYI).

To share the search-path model, the import layer chain is extracted into CrossFileLayers / CollationView / cross_file_layers(), which support both the definition and effect sides.

@lionel-
lionel- force-pushed the oak-nse/5-eager-attach branch from 772463a to d43a67a Compare July 17, 2026 08:56
@lionel-
lionel- force-pushed the oak-nse/6-resolver branch 2 times, most recently from 019fa41 to 9e15505 Compare July 17, 2026 11:26
@lionel-
lionel- force-pushed the oak-nse/5-eager-attach branch from d43a67a to 4dd85c0 Compare July 17, 2026 11:26
@lionel-
lionel- force-pushed the oak-nse/6-resolver branch from 9e15505 to 3ee2789 Compare July 17, 2026 13:55
@lionel-
lionel- force-pushed the oak-nse/5-eager-attach branch from 4dd85c0 to 3a2d3a6 Compare July 17, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant