chore: remove submodule-era residue — dead foundry.lock, .gitmodules and lib/ references - #23
chore: remove submodule-era residue — dead foundry.lock, .gitmodules and lib/ references#23thedavidmeister wants to merge 2 commits into
Conversation
…and lib/ references This repo vendors nothing as a git submodule: there is no `.gitmodules`, no `lib/` directory, and `git ls-files --stage` reports zero gitlinks. Dependencies come from soldeer — `foundry.toml` sets `libs = ["dependencies"]` and `soldeer.lock` is the live lockfile for forge-std 1.16.1, rain-lib-hash 0.1.0 and rain-solmem 0.1.3. `foundry.lock` is Foundry's submodule lockfile. It still pinned three `lib/` paths that do not exist, at revisions that contradict what the build actually resolves (its forge-std pin `1801b054` is v1.14.0 against soldeer's 1.16.1; its rain.solmem pin `2e47e41a` is not any tagged release against soldeer's 0.1.3). Nothing reads that side, so nothing reconciled them — it only produced three `Dependency '...' not found at expected path` warnings on every `forge build`. Confirmed gone after this change. Submodules cannot come back either: rainix CI runs a `no-submodules` check that fails on a root `.gitmodules` or any committed gitlink. Removed: - `foundry.lock` - its `REUSE.toml` annotation entry - `.soldeerignore` entries for `.gitmodules`, `/lib` and `/foundry.lock` — every one a path absent from the tree - `.soldeerignore` entries for `.coderabbit.yaml` and `CLAUDE.md` — neither config exists here, tracked or ignored `.soldeerignore` keeps `.DS_Store`, `.vscode`, `.pre-commit-config.yaml` and the build/publish outputs (`/out`, `/cache`, `/dependencies`, `/remappings.txt`): those are absent from a clean checkout by design and present when `soldeer push` runs. The retained `/lib`-adjacent source dirs `src/lib` and `test/lib` are package-internal and were never covered by the root-anchored `/lib` entry. Closes #22 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
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 ignored due to path filters (1)
📒 Files selected for processing (2)
💤 Files with no reviewable changes (2)
WalkthroughThe change removes obsolete ChangesDependency reference cleanup
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to This localized cleanup removes obsolete submodule-era files and ignore entries without changing Solidity behavior; the reported validation checks pass, so no actionable merge-blocking risk remains beyond normal checks and review. Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 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 |
`.soldeerignore` is a publish FILTER, not a description of the tree. An entry naming a path that is absent today is a forward-looking rule: drop it and that file gets published into the soldeer package the moment anyone adds it. The previous commit removed `.coderabbit.yaml` and `CLAUDE.md` on the grounds that neither file exists here. That reasoning does not hold for a filter, so both are restored. Neither is misspelled here, so nothing else changes. Only the submodule-era entries stay removed — `.gitmodules`, `/lib` and `/foundry.lock`. Those are not forward-looking: rainix CI's `no-submodules` check rejects any `.gitmodules` or committed gitlink, forge never creates `lib/` under `libs = ["dependencies"]`, and `foundry.lock` is deleted by this branch. `REUSE.toml` is unaffected: its annotations describe files that exist, so a path that is gone is residue there and still goes. Verified after the restore, in the CI-pinned rainix `sol-shell`: `reuse lint` compliant 20/20, and `forge soldeer push --dry-run` produces the same 14-entry package as `main` does. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Closes #22
What this removes
foundry.lockREUSE.tomlline 16 —"foundry.lock",.soldeerignore—.gitmodules.gitmodulesin the tree, zero gitlinks.soldeerignore—/liblib/,foundry.tomlsetslibs = ["dependencies"].soldeerignore—/foundry.lockThree deletions, 15 lines, no Solidity touched.
Why it is dead
Dependencies come from soldeer.
soldeer.lockis the live lockfile — forge-std 1.16.1, rain-lib-hash 0.1.0, rain-solmem 0.1.3 — and everything resolves underdependencies/, solib/is never created.foundry.lockmeanwhile pinned threelib/paths that do not exist, at revisions that contradict what the build resolves: its forge-std pin1801b054is v1.14.0 against soldeer's 1.16.1, and its rain.solmem pin2e47e41ais not any tagged release against soldeer's 0.1.3. Nothing reads that side, so nothing ever reconciled them.Submodules cannot come back: rainix CI runs
no-submodules, which fails on a root.gitmodulesor any committed gitlink.Why the rest of
.soldeerignorestays.soldeerignoreis a publish filter, not a description of the tree. An entry naming a path that is absent today is a forward-looking rule — drop it and that file gets published into the soldeer package the moment anyone adds it. So absence alone is not a reason to remove a line, and.coderabbit.yaml,CLAUDE.md,.DS_Store,.vscode,.pre-commit-config.yamland the build/publish outputs (/out,/cache,/dependencies,/remappings.txt) all remain. Neither.coderabbit.yamlnorCLAUDE.mdis misspelled here, so there was nothing to correct in place either.The three entries that do go are not forward-looking: the paths they name cannot come back.
.gitmodulesand gitlinks are rejected by rainix CI,lib/is never created underlibs = ["dependencies"], andfoundry.lockis deleted by this branch.REUSE.tomlis the opposite case and is unaffected by that reasoning: its annotations describe files that exist, so a path that is gone is residue there and goes.src/lib/andtest/lib/are this package's own source dirs, never matched by the root-anchored/libentry, and still ship in the package (proved below).Scope is rain.lib.memkv only — the same residue in sibling repos has its own issue each.
Verification
Everything below ran in the shell CI itself pins,
github:rainlanguage/rainix/53e96a7d0a97d7c7c75c3b2412521324776fdac6#sol-shell.Precondition checked before touching any
.gitmodules/lib/reference:git ls-files --stage | grep ^160000is empty (zero gitlinks) and there is no.gitmodulesin the tree.Full
rainix-solsuite green:legal—reuse lintstatic—slither .static—forge fmt --checkstatic—rainix-sol-single-contracttest—forge testQA
forge build --forcewarning set — on base (withfoundry.lockrestored into this same tree) it emitsWarning: Dependency 'lib/rain.lib.hash' not found at expected path,'lib/rain.solmem','lib/forge-std'; on this branchgrep -i "not found at expected path"over the build output matches nothing (exit 1). Same tree, same shell, only the file differs.forge soldeer push rain-lib-memkv~0.1.2 --dry-runpackage manifest — base and branch produce the same 14 entries (LICENSE,LICENSES/,README.md,src/lib/LibMemoryKV.sol,test/lib/LibMemoryKVSlow.sol, the 5test/src/lib/*.t.solfiles and their dirs). This is the check on the only thing.soldeerignoreaffects: dropping/libdid not stopsrc/libandtest/libshipping, and nothing new leaked in. Re-run after the forward-looking entries were restored — still 14, identical. Manifests read withzipfile.namelist(), notunzip(absent from the shell; an earlier attempt produced two empty listings and a vacuousdiffexit 0, which is why the comparison is stated from the entry names above).reuse lintexit code — 0 on this branch after the annotation entry was removed.REUSE.toml→ delete the live"soldeer.lock",annotation path → killed byreuse lint: exit 1,Files with copyright information: 19 / 20, "not compliant". Soreuse lintdoes fail on a dropped annotation for a file that exists; it passes here only becausefoundry.lockno longer exists — the exact risk this diff carried..soldeerignore→ delete the live/soldeer.lockentry → killed by the dry-run manifest: 14 → 15 entries,soldeer.locknow inside the package. So check 2 is discriminating and its base-vs-branch identity is a real result, not a blind harness. This mutant is also the direct evidence for why the forward-looking entries were restored: a dropped.soldeerignoreline publishes the file.git status --porcelainempty after each.reuse lintis the REUSE 3.3 spec implementation and is thelegaljob verbatim. The package manifest is whatsoldeer pushwill actually upload, read out of the zip rather than inferred from ignore syntax. Thefoundry.lockpins were checked against upstream ground truth —1801b054is forge-std v1.14.0 by its GitHub release tag,2e47e41amatches no rain.solmem tag (v0.1.3 isce03de80) — versus whatsoldeer.lockresolves.foundry.lockdeleted, (b) itsREUSE.tomlannotation entry removed, (c) the listed.soldeerignorelines removed, (d) no moreDependency '...' not found at expected path, (e) no.gitmodules/lib//foundry.lockreference left outsidedependencies/, (f) CI green. (a)(b) in the diff; (c) narrowed to the submodule-era three — the issue also listed.coderabbit.yamlandCLAUDE.mdas dangling, but.soldeerignoreis a filter and those entries are forward-looking protection, so they stay; (d) by check 1; (e) bygit grepover the tree — the only survivinglib/hits aresrc/lib/…andtest/lib/…import paths, this package's own layout, not submodule references; (f) by the suite table above. The issue's out-of-scope list (.DS_Store,.vscode,.pre-commit-config.yaml,/out,/cache,/dependencies,/remappings.txt, and sibling repos) was not touched.