You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stdlib #5: cross-file use resolvability from standalone check #415
Child issue of #412 (stdlib umbrella). Item stdlib #5 in docs/stdlib-roadmap.adoc.
What
Make use stdlib::Option (and similar) work from a single-file standalone check, not just from a full project build.
Why
Idaptik PR #107 (the dlc-reversible pilot) hit this directly: Option / Some / None were not reachable from a standalone .affine file under affinescript check. The workaround was defining a local enum UndoResult { Stepped(Vm, Instruction), HistoryEmpty } in the consumer file.
Every multi-file consumer that wants to single-file-check a slice of its code hits this. Closes the local-enum workaround pattern as the default escape valve.
What we know
Standalone affinescript check cannot currently resolve cross-file use.
prelude.affine re-exports Option / Result / etc., but the prelude itself isn't being applied in standalone mode.
This is partially a name-resolver bug and partially a stdlib organisation question (should Option always be in scope without explicit use?).
Two angles (probably both)
Name-resolver fix — lib/name_res.ml (or equivalent): teach the resolver to find prelude modules even in standalone check mode.
Stdlib organisation — decide whether Option / Result / Some / None / Ok / Err are always in scope (Rust-prelude-style) or require explicit use stdlib::Option.
The roadmap doc cross-references items #5, #6, and #10 — they're all the same family of issue around prelude / Option reach + import-aware pattern matching.
Done when
affinescript check file.affine succeeds for files using Option::Some(x) / Option::None without local enum workaround
Activity
fix(loader): discover stdlib via walk-up + user-share fallbacks (closes
feat(diagnostics): prelude-hint for UndefinedVariable / Unbound (stdlib
docs(stdlib+alib-roadmap): fill in Tracking sections with live umbrel…
docs(stdlib+alib-roadmap): fill in Tracking sections with live umbrel…
docs(stdlib+alib-roadmap): fill in Tracking sections with live umbrel…
Roadmap tracking + Zig-FFI doc (#19) + hex/base64 encoding (#25) + In…