Skip to content

Move soldeer release metadata under foundry's [external] section - #143

Merged
thedavidmeister merged 1 commit into
mainfrom
2026-08-17-issue-114
Aug 17, 2026
Merged

Move soldeer release metadata under foundry's [external] section#143
thedavidmeister merged 1 commit into
mainfrom
2026-08-17-issue-114

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Closes #114

foundry.toml opened with a bare [package]. foundry reads any root section it
does not reserve as a profile, so every forge invocation printed:

Warning: Found unknown config section in foundry.toml: [package]
This notation for profiles has been deprecated and may result in the profile not being registered in future versions.
Please use [profile.package] instead or run `forge config --fix`.

The section is now [external.package]. [external.*] is the section foundry
reserves for another tool's config and ignores — added for exactly this in
foundry-rs/foundry#5866, and excluded from forge config --fix in
foundry-rs/foundry#12723. forge config on this branch prints no warning.

The issue's reason for not running forge config --fix is not the real one

The 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-core 0.10.1 — the version forge
    1.7.2-nightly (43923a4e, the pinned toolchain) links — has zero occurrences
    of the string package in src/config.rs, and none anywhere that reads a
    [package] section. Its config detection picks foundry.toml because of
    [dependencies]. forge soldeer push takes name and version as name~version
    on the command line.

  • [profile.package] would not have broken the version reader either.
    rainix-static soldeer-gate (read_local_version) and autopublish's bump
    sed both anchor on the first ^version[[:space:]]*= line, not on a section.

  • What forge config --fix actually does is fail at its own purpose. Run on
    a copy of this repo it replaces one warning with two:

    Warning: Found unknown `name` config for profile `package` defined in foundry.toml.
    Warning: Found unknown `version` config for profile `package` defined in foundry.toml.
    

    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.toml is in .soldeerignore, so it is not in the published package.
The real CI gate (rainix-static soldeer-gate, run from the rainix SHA
53e96a7d that rainix-autopublish.yaml pins) with only foundry.toml changed:

before: remote=0.1.34 publish=0.1.35 next=0.1.36 OLD=875cce77… NEW=875cce77…  changed=false
after:  remote=0.1.34 publish=0.1.35 next=0.1.36 OLD=875cce77… NEW=875cce77…  changed=false

Byte-identical package hash, same version/next. forge soldeer push rain-sol-codegen~0.1.35 --dry-run succeeds on the new section. The bump step
(sed -i -E "0,/^version[[:space:]]*=.*/s//version = \"$NEXT\"/" foundry.toml)
rewrites line 9 to 0.1.36 and 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 main publishes 0.1.35 as
designed.

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 — the soldeer-package input description and
soldeer-gate's failure messages — also says [package].version. Those are
rainix/other-repo changes, called out in the report rather than made here.

QA

  • Discriminating tests: n/a — no Solidity behaviour changes. Every test file in
    this repo mirrors a src/ file (test/src/ mirrors src/), and this release
    metadata has no src/ counterpart, so there is nowhere in the mirror tree a
    test for it belongs. The discriminating check is a command, run both ways:
    nix develop -c forge config prints the [package] deprecation warning on
    origin/main (390f781) and prints nothing on 4ce177e.
  • Mutations applied: n/a — the diff is a TOML section name and a README line;
    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 (identical NEW hash, version, next),
    forge soldeer push --dry-run (succeeds), and autopublish's bump sed
    (rewrites the same line to 0.1.36).
  • Oracle: foundry's own source at the pinned toolchain SHA, not its warning text
    Config::EXTERNAL_SECTION / is_standalone_section in
    crates/config/src/lib.rs and providers/warnings.rs (43923a4e), which is
    what decides whether a section warns; soldeer-core 0.10.1 src/config.rs for
    what soldeer reads; rainix-static/src/soldeer_gate.rs read_local_version
    for what autopublish reads.
  • Category check: the issue asks for the warning to stop being emitted without
    breaking publishing, and lists three options — (1) record why forge config --fix must not be run, (2) silence it at source if foundry offers a way to
    declare a section as foreign, (3) raise it upstream. (2) is what landed:
    foundry does offer it ([external.*], feat: support external sections in foundry.toml foundry-rs/foundry#5866). (1) landed
    with 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 --check exit 0. slither .: 9 contracts, 98 detectors, 0 results.
    reuse lint compliant.

Summary by CodeRabbit

  • Documentation

    • Updated publishing instructions to use the [external.package] metadata section.
  • Bug Fixes

    • Corrected package metadata configuration while preserving the existing package name and version.

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>
@thedavidmeister thedavidmeister self-assigned this Aug 17, 2026
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 95a91020-1676-4196-80ca-830242b1e8b9

📥 Commits

Reviewing files that changed from the base of the PR and between 390f781 and 4ce177e.

📒 Files selected for processing (2)
  • README.md
  • foundry.toml

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


Walkthrough

The package metadata section in foundry.toml was renamed from [package] to [external.package]. The README now documents the corresponding [external.package].version key.

Changes

Package metadata configuration

Layer / File(s) Summary
Update package metadata section
foundry.toml, README.md
The configuration section and its documented version key now use [external.package]. The package name and version remain unchanged.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 4ce17

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: claude, dcatki

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes moving Soldeer release metadata into Foundry's external configuration section.
Linked Issues check ✅ Passed The changes remove the bare [package] warning, preserve release metadata handling, and update documentation for issue #114.
Out of Scope Changes check ✅ Passed The changes are limited to foundry.toml and README.md updates required to resolve issue #114.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-08-17-issue-114

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This was referenced Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

foundry.toml's bare [package] warns on every forge invocation, and forge's suggested fix would break soldeer publishing

1 participant