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
Tool-mode compiles of compiler-library tools fail at codegen: unresolved field types (MirBuilder.cur_bb, CiMigrate structs) #705
Every tool that pulls compiler.Compilation as a library (tools/annotate_receivers.w, tools/migrate_method_arg_moves.w — including pristine HEAD copies) fails under the current seed+tree at code generation with 'unresolved type for field', e.g. cur_bb in MirBuilder, several CiMigrate IR structs. with check src/main.w is clean; only the tool-mode root shape trips it. Both of today's archived seeds reproduce; a pre-batch worktree couldn't be tested (missing generated out/gen modules). Needs bisection over today's commits with per-commit stage1s, or lldb on the codegen branch that fails to resolve the field type. Found while running the #691 migration tooling; the migration proceeded via a TSV-driven byte splicer instead.
Fixed in 57842ad. Root cause: codegen's frozen type resolution (resolve_type_expr_frozen → lookup_named_type_visible → decl_visible_from_current) evaluated module visibility from sema.current_module_path, which codegen never set — it stayed at the compilation root. src/main.w as root shares the src/ internal-implementation boundary with every compiler module, so compiler builds never noticed; a tool root outside src/ made non-pub cross-module distinct aliases (Mir.BlockId in MirBuilder.cur_bb, CiTypeId in CImport IR structs) invisible, and pass-0b struct layout failed. sync_decl_context now points sema.current_module_path at the declaring module, matching ComptimeEval/MirLower's established save-set pattern. Verified with a minimal 'use compiler.Compilation' tool root and with tools/migrate_shareplace.w running its full fact+lex pass on stage1.
Activity
ehartford commentedon Jul 27, 2026
Fixed in 57842ad. Root cause: codegen's frozen type resolution (resolve_type_expr_frozen → lookup_named_type_visible → decl_visible_from_current) evaluated module visibility from sema.current_module_path, which codegen never set — it stayed at the compilation root. src/main.w as root shares the src/ internal-implementation boundary with every compiler module, so compiler builds never noticed; a tool root outside src/ made non-pub cross-module distinct aliases (Mir.BlockId in MirBuilder.cur_bb, CiTypeId in CImport IR structs) invisible, and pass-0b struct layout failed. sync_decl_context now points sema.current_module_path at the declaring module, matching ComptimeEval/MirLower's established save-set pattern. Verified with a minimal 'use compiler.Compilation' tool root and with tools/migrate_shareplace.w running its full fact+lex pass on stage1.
Codegen: frozen resolution judges visibility from the declaring module (
CCodegen: frozen type resolution runs in the declaring module; a fail…
CCodegen: frozen type resolution runs in the declaring module; a fail…
Sema/Frontend: engine corpora never ambient (§18.2); bundle interface…