Uh oh!
There was an error while loading. Please reload this page.
Move the release version under foundry's [external] section - #136
Conversation
foundry read the bare [package] as an unregistered profile and warned on every invocation. [external.*] is the section it reserves for another tool's config and ignores, so the release metadata moves there and the reader follows it to .external.package.version.
Warning Review limit reached
Next review available in:26 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
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 |
Uh oh!
There was an error while loading. Please reload this page.
Closes#133
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]andLibRainDeploySnapshot.deployTagreads
.external.package.version.forge configon this branch prints no suchwarning. Same change, same section, as
rain.sol.codegenrainlanguage/rain.sol.codegen#143.
Verified at source, at this repo's pinned toolchain
The flake here resolves
forge 1.7.2-nightlyat43923a4e, and at that SHA:Config::is_standalone_sectionreturns true forEXTERNAL_SECTION(
crates/config/src/lib.rs:718-722).WarningsProvider::collect_warningsemits
UnknownSectionfor exactly the root keys that predicate rejects(
crates/config/src/providers/warnings.rs), andforge config --fixfiltersby the same predicate (
crates/config/src/fix.rs:146).externalis NOT inSTANDALONE_SECTIONS, so nothing under it is merged into a profile either —which is why
name/versionunder it cannot raiseUnknownKeythe way theywould under
[profile.package].Cargo.lockpinssoldeer-core 0.10.1, whosecrates/core/src/config.rscontains the stringpackagezero times.rainix-tag-releasepublishes withforge soldeer push "$SOLDEER_PACKAGE~$VERSION"— name and version off thecommand line, not out of the file.
The release path is unchanged, measured rather than assumed
This is a tag-released repo, so the one automated writer of that line is
rainix-tag-release's bump —sed -i -E "0,/^version[[:space:]]*=.*/s//version = \"${VERSION}\"/" foundry.tomlfollowed by a
grep -qxEthat fails the release loudly if it matched nothing.Run against both files with
VERSION=0.1.6:foundry.tomlsedresultgrep -qxEed91bfa(main)version = "0.1.5"->version = "0.1.6"version = "0.1.5"->version = "0.1.6"It anchors on the first line beginning
versionwith no section awareness, andthat line is still first and unindented.
foundry.tomlis also in.soldeerignore, so the published package's bytes never contained it.Ramification: what a consuming repo must declare
LibRainDeploySnapshotis published anddeployTag(vm)reads the CONSUMINGrepo's
foundry.toml, so a repo that calls it must carry its release version at[external.package].version. Consumers pin exact versions, so nothing moves foranyone until they bump, and this repo's own version only advances on a
sol-v*tag — this PR publishes nothing. The library's
@devnote now names that keynext to the
fs_permissionsentry it already required.Adversarial mutation pass
Committed before mutating. Every run is the WHOLE suite with no filter, because
a filter is the trap this repo sets:
LibAddressRegistryDeploy's address andcodehash pins fail under any change to compiler input, so a filter that includes
them reports KILLED for everything and measures nothing. They stay green in all
five runs below, which is what shows the suite discriminating rather than
collapsing.
foundry.toml:[external.package]->[package]testReleaseVersionLivesUnderTheExternalSection+ the 8deployTagreaders.package.versiontestDeployTagUsesTheGuardedConversion+ 7freezetests.external.package.nameUnreleasableVersion("rain-deploy")[package]testReleaseVersionLivesUnderTheExternalSectionONLYfoundry.toml:[external.package]->[profile.package]5 killed, 0 survived. The 51 failures in every row are the unchanged
*_RPC_URL not foundbaseline.M4 is what earns the new test. The read still resolves, the release path is
intact and every pre-existing test passes; the only thing that fails is
assertFalse(vm.keyExistsToml(config, ".package")). Without that half of theassertion, a repo could grow the warning back with a green suite. M5 is the
mirror:
[profile.package]silences the.packagehalf and fails the.external.package.versionhalf, so both assertions are load-bearing and thetest pins
externalspecifically rather than "not[package]".Checks
nix develop -c forge config: the[package]warning is present oned91bfaand absent on this branch; the only line left on stderr is the unrelated
nightly-build notice, which
ed91bfaprints too.nix develop -c forge test: 260 passed / 51 failed / 311 total, against259 / 51 / 310 on
ed91bfa. The +1 is the new test; no other count moves, andall 51 are
*_RPC_URL not found.nix develop -c forge fmt --check: exit 0.QA
testReleaseVersionLivesUnderTheExternalSectionintest/src/lib/LibRainDeploySnapshot.t.sol— fails on base, verified byrunning it against
ed91bfa'sfoundry.tomlas mutant M1 above(
[external.package]->[package],[FAIL: assertion failed]).testDeployTagUsesTheGuardedConversionand the sevenfreezetests fail onbase too once the reader moves (M2/M3). The test's subject is
deployTag'ssource of truth, so it mirrors
src/lib/LibRainDeploySnapshot.sol; it readsfoundry.tomlthe waytestSupportedNetworksAreFullyConfiguredalready readsit for
[rpc_endpoints]/[etherscan]— config, not prose.foundry.toml:5[external.package]->[package]->testReleaseVersionLivesUnderTheExternalSection+ 8deployTagreaders;foundry.tomlgains a second bare[package]alongside the working read ->testReleaseVersionLivesUnderTheExternalSectionalone;foundry.toml:5->[profile.package]-> the same 9;src/lib/LibRainDeploySnapshot.sol:101".external.package.version"->".package.version"->testDeployTagUsesTheGuardedConversion+ 7freezetests; the same line ->
".external.package.name"-> the same 8 viaUnreleasableVersion("rain-deploy"). 5 applied, 5 killed, 0 survived; fulltable with per-run suite counts above.
is_standalone_section/STANDALONE_SECTIONSandfix.rsat43923a4e,soldeer-core 0.10.1crates/core/src/config.rs— plusrainix-tag-release'sbump
sed/greprun against the real file. Not the warning text, and notthis repo's own code.
[package]->[external.package]with
versionleft unindented and first, (b) a comment saying the section isanother tool's metadata rather than foundry config, (c) prose naming
[package].versionfixed in the same pass, and (d) the version reader provenbyte-identical before and after. Covered a, b, c, d. (d) is the
rainix-tag-releasebump rather thanrainix-static soldeer-gate: this repois tag-released,
package-release.yamlcallsrainix-tag-release.yaml, andsoldeer-gateruns only inrainix-autopublish.yaml, which this repo neverinvokes. Both anchor identically on the first
^version[[:space:]]*=line.Beyond the issue: this repo has a reader the issue's precedent repo does not —
LibRainDeploySnapshot.deployTagreally parses the TOML — so the path moveswith the section, which is the coordination the issue's closing note
sequences.