From 35cd1aeb47e8bc68f41b353687d66bcbedbb799b Mon Sep 17 00:00:00 2001 From: David Meister Date: Thu, 20 Aug 2026 13:52:37 +0000 Subject: [PATCH 1/2] Fix foundry.toml [package] warning: rename to [external.package] Bare `[package]` is not a foundry config section, so forge warns on every invocation (and `forge config --fix` makes it worse by registering a bogus `[profile.package]`). Foundry ignores the `[external.*]` namespace, so the warning disappears with no new warning. `name`/`version` are kept: this is a deploy repo, version 0.1.5 names the current frozen src/generated/ snapshot. BuildPointers.sol deployTag() reads the version via vm.parseTomlString(..., ".package.version"), so the rename is entangled: the read path is updated in lockstep to ".external.package.version" (plus its comment) or deployTag() resolves empty and breaks regeneration/release. Two prose references to the literal path (README, CLAUDE) are updated to match. Closes #13 Co-Authored-By: Claude Opus 4.8 --- CLAUDE.md | 6 +++--- README.md | 2 +- foundry.toml | 2 +- script/BuildPointers.sol | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 7c196cb..13e53ff 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -28,9 +28,9 @@ live in `rain.factory` and arrive as the `rain-factory` Soldeer dependency - `src/generated//` snapshots are **frozen**: a release ADDS a new tag dir, never edits or deletes an existing one. CI enforces append-only. -- `[package].version` is the **last released** version — it names the current - `src/generated//` snapshot. A normal PR does not bump it; only a release - moves it, in lockstep with the snapshot. +- `[external.package].version` is the **last released** version — it names the + current `src/generated//` snapshot. A normal PR does not bump it; only a + release moves it, in lockstep with the snapshot. - `LibCloneFactoryDeploy.sol` aliases the current tag's snapshot; `script/BuildPointers.sol` regenerates both. Generated files — do not hand-edit. diff --git a/README.md b/README.md index 25f1380..837efa3 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ tagging: the `Manual sol artifacts` workflow runs `script/Deploy.sol` for the `clone-factory` suite. Tagging then runs `rainix-tag-release`, which never broadcasts a deploy itself; its mechanics live in rainix. -Nothing publishes on merge, so `[package].version` and the frozen +Nothing publishes on merge, so `[external.package].version` and the frozen `src/generated//` snapshot it names only ever move together. See rainlanguage/rain.factory#46 for the split rationale. diff --git a/foundry.toml b/foundry.toml index 90e23b3..b5d92aa 100644 --- a/foundry.toml +++ b/foundry.toml @@ -1,4 +1,4 @@ -[package] +[external.package] name = "rain-factory-deploy" version = "0.1.5" diff --git a/script/BuildPointers.sol b/script/BuildPointers.sol index 5b5631e..a839511 100644 --- a/script/BuildPointers.sol +++ b/script/BuildPointers.sol @@ -32,10 +32,10 @@ contract BuildPointers is Script { // REUSE-IgnoreEnd /// @notice The canonical release tag. Read from `foundry.toml` - /// `[package].version` — the single source of truth — with dots converted to - /// underscores for the Solidity dir form (`0.1.3` -> `0_1_3`). + /// `[external.package].version` — the single source of truth — with dots + /// converted to underscores for the Solidity dir form (`0.1.3` -> `0_1_3`). function deployTag() internal view returns (string memory) { - string memory version = vm.parseTomlString(vm.readFile("foundry.toml"), ".package.version"); + string memory version = vm.parseTomlString(vm.readFile("foundry.toml"), ".external.package.version"); bytes memory b = bytes(version); bytes memory out = new bytes(b.length); for (uint256 i = 0; i < b.length; i++) { From 8e05d99299cc8ba23def751278e2b4ab81e04af8 Mon Sep 17 00:00:00 2001 From: David Meister Date: Thu, 20 Aug 2026 13:59:47 +0000 Subject: [PATCH 2/2] Add [external.package] metadata comment (issue #13 requirement) Issue #13 requires a comment stating the section is another tool's metadata, not foundry config. The comment is written for this DEPLOY repo (inverted from the library precedent): version is the LAST-published Soldeer release, moved only by a manual sol-v* tag, and IS read here by BuildPointers.sol deployTag() to name the frozen src/generated// snapshot. Co-Authored-By: Claude Opus 4.8 --- foundry.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/foundry.toml b/foundry.toml index b5d92aa..76f86b1 100644 --- a/foundry.toml +++ b/foundry.toml @@ -1,3 +1,11 @@ +# Release metadata, not foundry config. `[external.*]` is the namespace foundry +# reserves for other tools and ignores outright, so it raises no unknown-section +# warning and `forge config --fix` leaves it alone (a section foundry does not +# reserve is read as a profile, warned about on every invocation and rewritten +# into `[profile.*]` by the fixer). `version` is the last-published Soldeer +# release — a deploy repo moves it only via a manual `sol-v*` tag, in lockstep +# with the frozen `src/generated//` snapshot it names — and is read here by +# `script/BuildPointers.sol` (`deployTag()`) to locate that snapshot. [external.package] name = "rain-factory-deploy" version = "0.1.5"