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
Pinned seed v0.15.2.0 lacks #1325's owned-specialization fix: stage1 links only when a cross-unit specialization lands next to a caller #1359
The pinned seed (seed.lock version=v0.15.2.0) predates 00bab6e (#1325), which added Codegen.gen_owned_specializations and made ensure_concrete_mir_function define a specialization only in the unit that owns its MIR body. In the seed, src/Codegen.w:6021 (at v0.15.2.0) generates the body unconditionally in whichever unit reaches a call, and unit_demote_foreign_definitions (:1356) deletes it in every unit that doesn't own it. So an instance whose callers all sit outside its owning unit is defined by no unit.
Stage1 is compiled by that seed at 16 codegen units (build/compiler.w:452). Whether stage1 links depends on how the MIR bodies happen to be packed into units. PR #1353 hit this: a Vec[i32].clone() in src/MirCore.w failed the stage1 link with undefined symbol: _Vec.clone__receiver__94_3, and a copy loop was put in to avoid it. with check can't catch this because it never runs codegen.
Repro (seed = src/main at the pinned version):
WITH_CODEGEN_UNITS=8 src/main run test/behavior/behav_codegen_units_owned_receiver_specialization.w
Undefined symbols: "_Vec.clone__receiver__94_3", referenced from ___wcu$146$Holder.dup in ...o.u6.o
It fails at 3, 7, 8, 12 and 16 units. A stage1 built from current source runs it correctly at every unit count. With 3, 8 and 16 units, nm on stage1's unit objects shows exactly one unit defining T _Vec.clone__receiver__224_3 and the others referencing it U.
Fix: cut a seed that contains #1325 and bump seed.lock (with run tools/bump_seed_pins.w, with build :seed). Until then, any compiler-source change that adds a new cross-unit generic instance can break the stage1 link, depending on how the bodies are packed.
Activity
seed: darwin-aarch64 pins nightly-20260922-local-1-8c859a7d0559 (#1325'…
MirCore: the drop-state scratch and input maps clone their chunk ids;…
WITH_KEEP_UNIT_OBJECTS keeps the unit objects on a failed link too (#…
MirCore: the drop-state scratch and input maps clone their chunk ids;…
WITH_KEEP_UNIT_OBJECTS keeps the unit objects on a failed link too (#…
Restore Vec.clone in drop-state storage; pin the cross-unit receiver …
ehartford commentedon Sep 23, 2026
Fixed on main by e1d6cdb (#1360's squash, which carried batch Y: #1410 for #1380, #1416 for #1395, #1422 for #1379, #1360 for #1359/#1331).