Move soldeer release metadata under foundry's [external] section - #143
Conversation
foundry reads any root section it does not reserve as a profile, so a bare [package] printed an unregistered-profile deprecation warning on every forge invocation. [external.*] is the section foundry reserves for another tool's config and ignores. The section is release metadata, not soldeer config: soldeer-core never reads a [package] section, and rainix-autopublish's version reader and bump both anchor on the first `^version[[:space:]]*=` line, which the move leaves in place. foundry.toml is in .soldeerignore, so the published package is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. WalkthroughThe package metadata section in ChangesPackage metadata configuration
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change moves release metadata into Foundry's external configuration section and updates the matching documentation without changing Solidity behavior or publishing outputs. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #114
foundry.tomlopened with a bare[package]. foundry reads any root section itdoes not reserve as a profile, so every
forgeinvocation printed:The section is now
[external.package].[external.*]is the section foundryreserves for another tool's config and ignores — added for exactly this in
foundry-rs/foundry#5866, and excluded from
forge config --fixinfoundry-rs/foundry#12723.
forge configon this branch prints no warning.The issue's reason for not running
forge config --fixis not the real oneThe issue says
[package]is soldeer's manifest and that[profile.package]would leave autopublish unable to find the version. Both were measured and are
wrong:
soldeer never reads it.
soldeer-core0.10.1 — the versionforge1.7.2-nightly (
43923a4e, the pinned toolchain) links — has zero occurrencesof the string
packageinsrc/config.rs, and none anywhere that reads a[package]section. Its config detection picksfoundry.tomlbecause of[dependencies].forge soldeer pushtakes name and version asname~versionon the command line.
[profile.package]would not have broken the version reader either.rainix-static soldeer-gate(read_local_version) and autopublish's bumpsedboth anchor on the first^version[[:space:]]*=line, not on a section.What
forge config --fixactually does is fail at its own purpose. Run ona copy of this repo it replaces one warning with two:
That, plus declaring release metadata to be a foundry profile, is why it must
not be run — not a broken publish.
Publishing is provably untouched
foundry.tomlis in.soldeerignore, so it is not in the published package.The real CI gate (
rainix-static soldeer-gate, run from the rainix SHA53e96a7dthatrainix-autopublish.yamlpins) with onlyfoundry.tomlchanged:Byte-identical package hash, same
version/next.forge soldeer push rain-sol-codegen~0.1.35 --dry-runsucceeds on the new section. The bump step(
sed -i -E "0,/^version[[:space:]]*=.*/s//version = \"$NEXT\"/" foundry.toml)rewrites line 9 to
0.1.36and touches nothing else.The README line naming the section is updated to match; that edit is a real
package content change, so the next merge to
mainpublishes0.1.35asdesigned.
Not done here
Five sibling repos still carry a bare
[package]and warn identically:rain.deploy,rain.math.float,rain.interpreter,rain.flare,rain.solmem. rainix's own text — thesoldeer-packageinput description andsoldeer-gate's failure messages — also says[package].version. Those arerainix/other-repo changes, called out in the report rather than made here.
QA
this repo mirrors a
src/file (test/src/mirrorssrc/), and this releasemetadata has no
src/counterpart, so there is nowhere in the mirror tree atest for it belongs. The discriminating check is a command, run both ways:
nix develop -c forge configprints the[package]deprecation warning onorigin/main(390f781) and prints nothing on4ce177e.there is no executable line to mutate. What stands in for it is running the
three consumers of that section name against the changed file:
rainix-static soldeer-gate(identicalNEWhash,version,next),forge soldeer push --dry-run(succeeds), and autopublish's bumpsed(rewrites the same line to
0.1.36).—
Config::EXTERNAL_SECTION/is_standalone_sectionincrates/config/src/lib.rsandproviders/warnings.rs(43923a4e), which iswhat decides whether a section warns;
soldeer-core0.10.1src/config.rsforwhat soldeer reads;
rainix-static/src/soldeer_gate.rsread_local_versionfor what autopublish reads.
breaking publishing, and lists three options — (1) record why
forge config --fixmust not be run, (2) silence it at source if foundry offers a way todeclare a section as foreign, (3) raise it upstream. (2) is what landed:
foundry does offer it (
[external.*], feat: support external sections infoundry.tomlfoundry-rs/foundry#5866). (1) landedwith it as the comment above the section. (3) is void — foundry already
shipped the mechanism, so there is nothing to raise; the residue is the five
sibling repos and rainix's stale text, both in "Not done here".
Checks
forge config: warning before, silent after.forge test: 275 passed / 0 failed / 29 suites, identical before and after(config + docs only, so the count must not move).
forge fmt --checkexit 0.slither .: 9 contracts, 98 detectors, 0 results.reuse lintcompliant.Summary by CodeRabbit
Documentation
[external.package]metadata section.Bug Fixes