Uh oh!
There was an error while loading. Please reload this page.
Remove dead LibSnapshot - #33
Conversation
It has no callers anywhere: an org-wide search finds it only in this repo, and every consumer pins rain-sol-codegen 0.1.0, which predates it. It was release machinery in a codegen library — 'which release am I building', 'where does its record live', 'freeze it immutably' are the deploy lifecycle, not code generation. That split is why nothing adopted it. The whole of it now lives in rain.deploy as LibRainDeploySnapshot, beside the deploy library it belongs with. LibFs.t.sol's cross-check on the frozen path goes with it; that coupling cannot drift in its new home, where pathForSnapshot delegates to LibFs.pathForContract rather than restating it.
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 (3)
💤 Files with no reviewable changes (3)
WalkthroughThe change removes ChangesSnapshot removal
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score:⚪ Minimal · up to This localized cleanup removes unused code and its related tests without changing supported functionality; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
🚥 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 |
thedavidmeister
commented
Aug 13, 2026
Reviewed 49ffe9f: APPROVE — pure deletion, 191 lines removed across three files with nothing added: Safe because it has no callers, verified rather than assumed: an org-wide code search for The functionality is not lost. It moved to Expected on merge: the deletion changes published package content, so autopublish bumps Rulings-conformance:
|
Uh oh!
There was an error while loading. Please reload this page.
LibSnapshotis dead code. Removing it, with its test and the one reference toit from
LibFs.t.sol.It has no callers
Not "no callers we need to worry about" — none at all:
LibSnapshotonly inside this repo (the libraryplus its own test, plus the one cross-check in
test/lib/LibFs.t.sol)rain-sol-codegenat 0.1.0, which predates it. Itfirst shipped in
sol-v0.1.1.So there is nothing to sequence and no migration window to protect. This PR can
merge in any order relative to anything else.
Why it is dead rather than merely unused
It is release machinery, not code generation. "Which release am I building",
"where does its record live" and "freeze it immutably" are the deploy lifecycle;
emitting a Solidity constant is codegen. Splitting those across two repos is why
nothing adopted it — the repo that needed it could not get a whole lifecycle
from here.
All of it now lives in
rain.deployasLibRainDeploySnapshot(rainlanguage/rain.deploy#26), beside the deploy library it belongs with, where
it also gained the guards a release actually needs: strict
X.Y.Z, refusing tore-cut a frozen release, refusing to freeze nothing, and a
freezethat takesthe regeneration as an argument so "freeze, then regenerate" has nowhere to be
written.
LibCodeGen,LibFsandLibHexStringare untouched and remain this repo'ssubject.
The
LibFscross-checktestFrozenPathTracksGeneratedFilenameasserted thatLibSnapshot's frozen pathtracked
LibFs.pathForContract. That coupling no longer exists here — and inrain.deployit cannot drift, becausepathForSnapshotdelegates toLibFs.pathForContractrather than restating it.testPathForContractstays andstill pins the generated-file location, which is the part consumers depend on.
Publishing
Removing a file changes the published package, so merging bumps this repo's
version via autopublish. That is expected: nothing consumes the removed symbols
on any published version anyone pins.
QA
forge test— 9 tests across 4 suites, all pass afterthe removal;
forge fmt --checkclean. The removed test only exercisedremoved code, so no remaining test loses coverage, and
testPathForContractstill pins the
src/generated/<name>.sollocation consumers commit andimport. Verified by running the suite on this branch.
equivalent evidence is the caller search: were any caller to exist, the
removal would fail compilation rather than a test, and compilation passes.
version anyone pins is dead by definition; the org-wide search plus the pinned
version of every consumer (0.1.0, which predates the symbol) is the evidence,
and neither is derived from this repo's own tests.
declaration of and reference to
LibSnapshot— the library, its test, and theLibFs.t.solcross-check — not just the library file. Verified by grep: noLibSnapshotstring survives anywhere in the repo.Summary by CodeRabbit