Open and answer this issue on GitHub.
ready · opened 2026-11-18 · updated 2026-11-18 · 0 comments
Found while: running the performance lane’s driver (Benchmarks Game, #1611), 2026-11-18. Related: #1430 (re-lowering a conflicted merge), #1333 (regenerating a clean merge), #1916 (the tree worktree).
When the driver merges origin/develop before the next issue, the merge conflicts in crates/nikaia-std/src/compiler/lowered.rs. Develop has added a new method, NodeId::at, which tree_build.nika calls. The driver aborts:
error[NK1171]: `node_id::NodeId` has no method called `at`.
--> target/ledger-tree/crates/nikaia-std/src/compiler/tree_build.nika:154:9
ESCALATE drive: merging origin/develop before the next issue, merge conflicted in crates/nikaia-std/src/compiler/lowered.rs, re-lowering failed (lower-std before the build), merge aborted (drive.nika ce846b53)
Resolving the merge by hand in this order worked (commit 208ef57f):
lowered.rs.cargo build --profile fast -p nikaia.lower-std with the new binary.scripts/drive.nika, drive_merge_regenerate, the block after let first = ... {build}. When the first build of the merged tree fails, the driver runs LOWER (drive_merge_lower) with the binary from before the merge. That compiler only knows the declarations of the old side. So it refuses every .nika file that uses something develop newly declared (NK1171), and the merge is aborted.
The first build usually fails for a small reason in the taken lowered files, such as a stale use, a missing field, or the digest. The old binary cannot fix those, because it cannot lower the new sources at all.
The driver merges a develop that adds a method used by a lowered .nika file, with a conflict only in lowered.rs, and needs no hand work. The log shows MERGE <sha8> re-lowered crates/nikaia-std/src/compiler/lowered.rs, and the short checks are green.
drive_merge_regenerate, when the first BUILD fails, do not reach straight for the old binary’s LOWER. First try to make the merged sources build:
.nika side is unchanged by the merge.lower-std has or can get a mode that needs only the Rust parts.blocked.lower-std with the binary from before the merge refused <file>: <first error>..nika test (tests/compiler/tests/ or the driver’s script tests) that recreates a lowered-only conflict, with a new method on their side, and expects the merge to settle.scripts/drive.nika (the #1430 paragraph) and the one on drive_merge_regenerate.scripts/drive.nika (drive_merge_regenerate, drive_merge_lower, drive_merge_relower)