Repository navigation
fix(emit_rust): pull std.serialization into emit closure via explicit import - #5761
Conversation
sorted-Vec was a git-log output redirected into the worktree root and captured by the session auto-committer. Not related to the fix.
|
Addressed the review findings: sorted-Vec stray file: removed via On the tri-import vs single symbol: the parent manager verified all three names are genuinely referenced in
— sent from sharp-tern-358 |
…ILES #5743 added src/v1/tests/fixtures/whole_tree_wiring_enum/*.dag fixtures which emit wt_a.rs, wt_b.rs, wt_common.rs but did not register them in GENERATED_STAGE0_FILES, causing assert_output_set_matches_registry to fail with "unregistered stage0 file(s)" before the std_serialization.rs missing check could fire. Register all three (consistent with the existing v1_test_non_ascii_perf_fixture.rs precedent for fixture modules).
Summary
Fixes two issues that together block
regen_stage0 --emit-freshon cleanorigin/main.Issue 1 — std_serialization closure-drift (the original blocker):
std.serializationwas never reachable from thesrc/v1/entry-point emit closure.source_files_for_rootsstarts from all.dagfiles undersrc/v1/and follows imports intodsl/; since nosrc/v1/DAG file importedstd.serialization, the module was absent from the closure and the emitter never generatedstd_serialization.rs— whileGENERATED_STAGE0_FILESlisted it.Fix: add
import std.serialization { CoproductWireContract, VariantEncoding, VariantNaming }tosrc/v1/05_emit_rust.dag. All three names are genuinely referenced in the file (CoproductWireContract: lines 1153–1247 validation + serde generation; VariantEncoding: 994–1090 serde dispatch; VariantNaming: 915/965 attribute rendering). The import makes the dependency explicit and restores the module to the emit closure.Issue 2 — wt_a/wt_b/wt_common unregistered (introduced by #5743):
#5743addedsrc/v1/tests/fixtures/whole_tree_wiring_enum/*.dagwhich are collected as entry files bycollect_dag_files(src/v1/)and emitted aswt_a.rs,wt_b.rs,wt_common.rs— but were not added toGENERATED_STAGE0_FILES. This "unregistered" error fires before the "missing" check, masking Issue 1 on post-#5743 main. Fix: register all three (consistent withv1_test_non_ascii_perf_fixture.rsprecedent).Test plan
regen_stage0 --emit-freshrun on branch with RUSTC_WRAPPER= SCCACHE_DISABLE=1 (to bypass sccache build-script issue); std_serialization.rs confirmed present in fresh output, both checks pass. Receipt pending (rebuild in progress).