Repository navigation
amaro: record node's and node-lts's bundled amaro once, in amaro-wasm/versions.ncl - #1389
Conversation
…/versions.ncl node, node-lts and amaro-wasm each carried their own `let amaro = "1.1.11"`, so a bump meant three hand edits and pkgmgr held amaro-wasm every night. versions.ncl now records which amaro each node line bundles plus each version's tag-tarball sha256; node and node-lts import their entry (build.sh still checks deps/amaro), and amaro-wasm builds every distinct version listed. No rebuild: every package's spec hash is unchanged (mip dump, amd64, 661 packages). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 4 billable files and costs up to $1.00.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 5 minutes for your next included review. View limit details
|
agent-137
left a comment
There was a problem hiding this comment.
Review on Karl's behalf. This is a comment, not an approval. Nothing was built for it. The findings come from reading the declarations and fetching upstream sources, and each one says how it was checked. The CI rollup on this head is now SUCCESS.
CI: Every check is green at head 05b4383. CodeRabbit was rate-limited and there is no review of any commit, so there is no bot coverage. The body says pkgmgr-rs#1246 should merge first. If it does not, the failure is closed: amaro-wasm stays held and the nightly warns.
Should-fix: none.
Nit
- packages/amaro-wasm/build.ncl:9. The comment says the versions come "in versions.ncl's field order". To my knowledge,
std.record.valuesreturns fields sorted by name, not in declaration order. I did not check this with nickel, which is not installed here.- The result is the same today, because "node" sorts before "node-lts".
- With a third line, or one whose name sorts differently,
amaro_versionsorder would not follow the file. That changes no behaviour, but the comment would mislead someone hunting a spec-hash diff. - Fix: reword it to "sorted by field name".
Checked, clean
- Recorded values:
bundled.node = 1.1.11andbundled.node-lts = 1.1.11equal main's literals, as doestag_sha256["1.1.11"] = f65b4e8a…, which matches main's Source sha.- main has not touched node, node-lts or amaro-wasm since the merge-base.
- Each node build.sh still fails closed unless
deps/amaro/package.jsonis$AMARO_VERSION. - The shared splice pin
79c79a0b…is the same in both recipes, which is consistent with both shipping the same amaro.
- Consumers:
git grep amaroshows node/build.ncl:38 and node-lts/build.ncl:37 readingversions.nclentries and forwarding them viainclude amaro.- amaro-wasm reads
versions.nclfor its Sources, itsamaro_versionsbuild_arg (consumed by build.sh'sfor v in $VERSIONS, extractingv$v.tar.gz), its test loop and itsupstream_version. - No other literal amaro version remains, and nothing in
.github/reads it.
- amaro-wasm reads
- Nickel:
versions.tag_sha256."%{v}"is valid interpolated field access, and a missing key fails evaluation, as the body says. - I did not reproduce the body's "661 spec hashes identical" claim, because there is no mip here. The values are unchanged, so it is plausible.
Verdict: Mergeable once pkgmgr-rs#1246 has merged. Only a comment nit.
node, node-lts and amaro-wasm each carried their own
let amaro = "1.1.11" in. A bump meant three hand edits. pkgmgr's lockstep constraint (pkgmgr-rs#1233) held amaro-wasm, and the nightly posted a Slack warning about it every day ("amaro-wasm 1.1.11 → 1.3.0 ... bump all three recipes together by hand").This PR records the value once, in a new file,
packages/amaro-wasm/versions.ncl:{ bundled = { node = "1.1.11", node-lts = "1.1.11" }, # what each node line ships under deps/amaro tag_sha256 = { "1.1.11" = "f65b4e8a…" }, # nodejs/amaro tag tarball, per version }let amaro = (import "../amaro-wasm/versions.ncl").bundled.node in. build.sh is unchanged and still fails unlessdeps/amaro/package.jsonis that version.bundled, with oneSourceper version (urlfrom the tag,sha256fromtag_sha256). A version listed inbundledwith notag_sha256entry fails evaluation (missing field).upstream_versionis node's entry.No rebuild. I ran
MINIMAL_SCIENCE_MODE=1 mip --no-fetch dump --packages --arch amd64over pkgs main (05187c6) and over this branch. All 661 spec hashes are identical, including node, node-lts and amaro-wasm. Negative control: changing node's entry to 1.3.0 (and adding a placeholder sha) changed all three hashes. amaro-wasm's build_args then becameamaro_versions = "1.3.0 1.1.11", with two amaro Sources. Removing that sha made evaluation fail.What happens on a node bump (companion pkgmgr-rs PR): when the updater bumps node or node-lts, it reads
deps/amaro/package.jsonfrom the new tarball. If the version differs from that line'sbundledentry, it does three things in the same PR:tag_sha256entry;splice deps/amaro/dist/index.jsline.amaro-wasm then rebuilds with node in that PR.
Merge order: merge gominimal/pkgmgr-rs#1246 first, then this PR. pkgmgr-rs#1246 reads both layouts, so this PR merges cleanly after it. If this PR merges first, the pkgmgr running today can't read node's new
let amaroline. It fails closed: amaro-wasm stays held, and the nightly's Slack warning names the unreadable record until pkgmgr-rs#1246 deploys. Nothing gets bumped wrongly either way.Not built locally: the spec hashes are unchanged, so there's nothing new to build.
🤖 Generated with Claude Code