chore(cannon): migrate testdata Makefiles to justfiles#19483
chore(cannon): migrate testdata Makefiles to justfiles#19483
Conversation
981017d to
9f85a7c
Compare
5c7a2c5 to
e0ed02c
Compare
6f81e0e to
5e144e5
Compare
e0ed02c to
1261c27
Compare
5e144e5 to
57be692
Compare
1261c27 to
c3b9c61
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #19483 +/- ##
===========================================
+ Coverage 75.3% 75.7% +0.4%
===========================================
Files 194 671 +477
Lines 11285 71270 +59985
===========================================
+ Hits 8502 54017 +45515
- Misses 2639 17109 +14470
Partials 144 144
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
c3b9c61 to
e4c158a
Compare
57be692 to
cb2c2f7
Compare
e4c158a to
a5226fc
Compare
cb2c2f7 to
4781beb
Compare
a5226fc to
7edf4ca
Compare
4781beb to
e349dce
Compare
7edf4ca to
84a660a
Compare
e349dce to
096e0c4
Compare
sebastianst
left a comment
There was a problem hiding this comment.
Review: cannon testdata Makefiles → justfiles
Small, clean migration. The Make pattern rules are replaced with shell loops that discover and build ELFs dynamically. A few notes:
1. Lost parallel builds
The original Make pattern rules (bin/%.64.elf) could build all ELF binaries in parallel with make -j. The just version uses a sequential for mod in */go.mod loop. For testdata binaries this probably doesn't matter much, but worth noting.
2. dump target changed discovery mechanism
Original: $(patsubst %/go.mod,bin/%.dump,$(wildcard */go.mod)) — dumps only ELFs that correspond to */go.mod directories.
New: for elf in bin/*.64.elf — dumps any .64.elf in bin/, regardless of whether a matching go.mod exists.
Unlikely to matter in practice (stale ELFs in bin/ would be an unusual scenario), but it's a subtle behavioral difference.
3. dump lost a TODO comment
Original had # TODO: currently have the little-endian toolchain, but should use the big-endian one. The -EB compat flag works though. — dropped from the justfile.
Everything else looks good
elf64: elfreverses the dependency direction from the original (elf: elf64) but produces the same result —elfdoes the work,elf64is an aliascleancorrectly adds|| trueto handle missingbin/directory (needed since just fails on non-zero exit, unlike Make with@)cannon/justfilecorrectly updated frommake -Ctojust ./testdata/elfsyntax- CircleCI change is straightforward
make elf→just elf - Deprecated shim order puts
elffirst, so baremake(no target) still defaults to building ELFs
Review generated by Claude Code
Follow-up: recovering lost parallelismA few patterns to recover the ELF build loops — replace the sequential mkdir -p bin
parallel --tag 'cd {} && GOOS=linux GOARCH=mips64 GOMIPS64=softfloat go build -o "../bin/{}.64.elf" .' ::: $(ls -d */go.mod | xargs -n1 dirname)Recipe-level deps (e.g. [script('bash')]
reproducible-prestate:
set -euo pipefail
make -C ./op-program build-reproducible-prestate &
(cd rust && just build-kona-reproducible-prestate) &
wait
make -C ./op-program output-prestate-hash
cd rust && just output-kona-prestate-hashThere's already a That said, Comment generated by Claude Code |
84a660a to
c0b0e5e
Compare
1095540 to
d403c42
Compare
c0b0e5e to
8f998b1
Compare
d403c42 to
9f10990
Compare
8f998b1 to
f2f76e2
Compare
9f10990 to
0961fba
Compare
f2f76e2 to
46b6245
Compare
0961fba to
e59b0b4
Compare
46b6245 to
3f01ec5
Compare
e59b0b4 to
879f06d
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d shim The deprecated.mk shim was changed to pass JUSTFLAGS as just CLI variable overrides (`just VAR=val target`), but just rejects overrides for variables not declared in the justfile. This broke CI jobs where Make variable assignments propagate through sub-makes (e.g. GO_TEST_FLAGS, GUEST_PROGRAM). Revert to passing them as environment variables via `env`, which is how the shim originally worked in the cannon migration PR. Fixes: go-tests-short, sanitize-op-program CI failures Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrate root build targets from Make to Just. The Makefile now delegates to just with a deprecation warning, preserving backwards compatibility for existing make invocations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All subdirectories now have justfiles with deprecated Make shims, so convert remaining make -C calls to cd && just. Also restores the explanatory comment on mod-tidy's GOPRIVATE usage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
just doesn't parallelize dependencies like make -j does. Use background processes with wait to run op-program and kona prestate builds concurrently. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The cd into cannon/ was changing the CWD for the rest of the script, causing gotestsum to run from cannon/ instead of the repo root. The original Makefile used $(MAKE) -C which spawns a subprocess. Use a subshell to match that behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The bare `cd op-program` on line 180 changed cwd persistently, so the following `cd rust` tried to resolve `op-program/rust/` which doesn't exist. Wrap both in subshells to preserve the original working directory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3f01ec5 to
7f50e24
Compare
f386241 to
207928f
Compare
These directories were removed in #19506 but the justfile still referenced them, causing go-tests-short-ci to fail with "lstat ./devnet-sdk/: no such file or directory". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrates all CircleCI make invocations to just for targets that have been migrated to justfiles. Remaining make calls are for packages not yet migrated (op-challenger, op-node, op-service, op-chain-ops fuzz targets) and cannon/testdata which has its own Makefile. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7f50e24 to
dc80630
Compare
Migrates cannon/testdata/, cannon/testdata/go-1-24/, and cannon/testdata/go-1-25/ Makefiles to justfiles. The Make pattern rules for building ELF binaries from go.mod directories are replaced with shell loops that discover and build all directories dynamically. Also updates cannon/justfile to call just instead of make -C for testdata targets, and updates the CI config accordingly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The generic deprecated.mk shim converts make variables to env vars, but diff-cannon VM: is a positional parameter in just. Write a manual shim that passes VM correctly. Also add deprecation warning to the diff-%-cannon pattern target. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Match the original Makefile behavior by iterating */go.mod directories instead of bin/*.64.elf to avoid dumping stale ELFs. Restore the TODO about the little-endian vs big-endian toolchain. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
207928f to
8e9e604
Compare
Summary
cannon/testdata/,cannon/testdata/go-1-24/, andcannon/testdata/go-1-25/Makefiles to justfilesbin/%.64.elf) for building ELF binaries fromgo.moddirectories are replaced with shell loops that discover and build all directories dynamicallycannon/justfileto calljustinstead ofmake -Cfor testdata targetsjust elfinstead ofmake elfStack
Test plan
just elfincannon/testdata/builds all ELF binariesjust elfincannon/testdata/go-1-24/builds go-1-24 ELF binaries🤖 Generated with Claude Code