Expand description
Workspace file discovery and @import closure construction (ADR-0091).
Each open editor buffer is analyzed as its own compilation root: the LSP
parses it, walks for @import("...") calls, transitively loads every
reachable file (open buffer first, on-disk fallback), and hands the closure
to the frontend as a single CompilationUnit. Unrelated files in the
workspace are never merged together — that’s what kept opening this very
repo from producing thousands of fn main() duplicate-definition errors
before ADR-0091’s per-root revision (2026-05-19).
Functions§
- build_
root_ closure - Build a (root + transitively-
@import-reachable)WorkspaceFileset for one compilation root. - enumerate_
gruel_ files - Enumerate every
*.gruelfile underroot, respecting.gitignoreand skipping.git/target.