Context
LibSnapshot now owns the per-release snapshot canon in rain-sol-codegen (rainlanguage/rain.sol.codegen#26, closing #25): deployTag(vm) and freezeSnapshot(vm, contractNames), with the immutability guard that reverts rather than rewrite a frozen record without a [package].version bump.
It was upstreamed because the canon was copy-pasted across four repos and had already diverged — deployTag() byte-identical in three, the freezing half in three different shapes, and the guard present in only half of them.
The change
script/BuildPointers.sol in this repo carries its own copy. Replace it:
- Import
LibSnapshot from rain-sol-codegen (this repo already depends on the package — BuildPointers.sol imports LibFs/LibCodeGen from it).
- Delete the local
deployTag() / freezing code.
- Call
LibSnapshot.freezeSnapshot(vm, names) with the generated contract names.
- Ensure
foundry.toml fs_permissions grants { access = "read", path = "foundry.toml" } (needed by deployTag).
Verification
Regenerating must be a no-op against the existing committed snapshots — same tag dir, byte-identical files. If anything changes, that is a real finding, not a formatting difference: stop and surface it rather than committing the diff.
Blocked on
rain-sol-codegen needs a version bump + publish — LibSnapshot is on main but the published package is still 0.1.0, so there is nothing to import yet.
This repo specifically
Carries both deployTag() and freezeSnapshot(), and is the copy the guard was taken from — so this is the straight swap with no behaviour change. 60 frozen tag dirs under src/generated/, so the no-op regeneration check matters here more than anywhere: a diff in any of those is a corrupted historical record.
Context
LibSnapshotnow owns the per-release snapshot canon inrain-sol-codegen(rainlanguage/rain.sol.codegen#26, closing #25):deployTag(vm)andfreezeSnapshot(vm, contractNames), with the immutability guard that reverts rather than rewrite a frozen record without a[package].versionbump.It was upstreamed because the canon was copy-pasted across four repos and had already diverged —
deployTag()byte-identical in three, the freezing half in three different shapes, and the guard present in only half of them.The change
script/BuildPointers.solin this repo carries its own copy. Replace it:LibSnapshotfromrain-sol-codegen(this repo already depends on the package —BuildPointers.solimportsLibFs/LibCodeGenfrom it).deployTag()/ freezing code.LibSnapshot.freezeSnapshot(vm, names)with the generated contract names.foundry.tomlfs_permissionsgrants{ access = "read", path = "foundry.toml" }(needed bydeployTag).Verification
Regenerating must be a no-op against the existing committed snapshots — same tag dir, byte-identical files. If anything changes, that is a real finding, not a formatting difference: stop and surface it rather than committing the diff.
Blocked on
rain-sol-codegenneeds a version bump + publish —LibSnapshotis onmainbut the published package is still 0.1.0, so there is nothing to import yet.This repo specifically
Carries both
deployTag()andfreezeSnapshot(), and is the copy the guard was taken from — so this is the straight swap with no behaviour change. 60 frozen tag dirs undersrc/generated/, so the no-op regeneration check matters here more than anywhere: a diff in any of those is a corrupted historical record.