Skip to content

Remove the submodule-era residue — dead foundry.lock, .gitmodules and lib/ references - #34

Merged
thedavidmeister merged 1 commit into
mainfrom
33-remove-submodule-residue
Aug 17, 2026
Merged

Remove the submodule-era residue — dead foundry.lock, .gitmodules and lib/ references#34
thedavidmeister merged 1 commit into
mainfrom
33-remove-submodule-residue

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Closes #33

What this removes

This repo migrated from git submodules to soldeer and the migration was never finished. Verified on a fresh clone of main (3e218a3):

  • git ls-files --stage | awk '$1 == "160000"'empty, no gitlinks
  • no .gitmodules, no lib/ in the tree
  • foundry.toml sets libs = ['dependencies']; soldeer.lock pins forge-std 1.16.1

foundry.lock is Foundry's submodule lockfile and still carried a pin for a path that does not exist:

{
  "lib/forge-std": {
    "rev": "1801b0541f4fda118a10798fd3486bb7051c5dd6"
  }
}

1801b054 is forge-std v1.14.0. The build uses 1.16.1. Nothing reconciled the two, because nothing reads the foundry.lock side.

Removed

File Entry
foundry.lock the whole file
REUSE.toml ".gitmodules", (line 9), "foundry.lock", (line 19)
.soldeerignore .gitmodules (6), /foundry.lock (16), /lib (18), /target (23)

/target: this repo has no Rust — no Cargo.toml, no crates/, and target is not in .gitignore. Nothing produces one.

Deliberately left alone

.soldeerignore's .DS_Store, .vscode, .pre-commit-config.yaml, /out, /cache, /dependencies, /docs are absent from a clean checkout by design — OS junk, local dev files, or artifacts generated at forge soldeer install / forge build / devShell entry, and therefore present when soldeer push runs. Correct ignores, kept.

REUSE.toml's ".audit/**" is live: .audit/scope.json is tracked.

The warning is gone

nix develop -c forge build --force, same tree, before and after.

Before:

Warning: This is a nightly build of Foundry. ...
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`.
Warning: Dependency 'lib/forge-std' not found at expected path
Compiling 21 files with Solc 0.8.25
Solc 0.8.25 finished in 585.89ms
Compiler run successful!

After:

Warning: This is a nightly build of Foundry. ...
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`.
Compiling 21 files with Solc 0.8.25
Solc 0.8.25 finished in 2.19s
Compiler run successful!

The two surviving warnings are pre-existing and unrelated (nightly-build notice, [package] section deprecation).

Nothing dangling remains

grep -rn "lib" --exclude-dir=dependencies --exclude-dir=out --exclude-dir=cache --exclude-dir=.git --exclude="*.pdf" . on the branch:

flake.nix:15:    flake-utils.lib.eachDefaultSystem (system: {
.audit/scope.json:5:    "src/lib/LibCtPop.sol",
.audit/scope.json:6:    "test/src/lib/LibCtPop.ctpop.t.sol"
test/src/lib/LibCtPop.ctpop.t.sol:17:} from "../../../src/lib/LibCtPop.sol";
foundry.toml:8:libs = ['dependencies']
src/lib/LibCtPop.sol:26:library LibCtPop {

Every hit read individually: a Nix attribute, three references to the real src/lib/ source tree (both files exist), the libs setting that points forge at dependencies/, and a Solidity library keyword. None is submodule residue. Zero hits for foundry.lock, gitmodules or target.

Local verification

All via nix develop -c:

Check Result
forge test 8 passed, 0 failed, 0 skipped — same 8 before and after
forge fmt --check clean, exit 0
reuse lint compliant, 18/18 files with copyright + license
slither . 1 contract, 100 detectors, 0 results

Configuration only. No Solidity source, no deployed bytecode, no audited artifact changes.

QA

  • Discriminating tests: n/a — no executable behaviour changes. The diff deletes a lockfile no tool reads and four no-op ignore/annotation lines; there is no code path a unit test could bind to. The discriminating observation is the build itself: forge build emits Warning: Dependency 'lib/forge-std' not found at expected path on base (3e218a3, transcribed above) and does not emit it on this head. Verified by running the same nix develop -c forge build --force on both, in the same working tree.
  • Mutations applied: n/a — no Solidity or executable source in the diff. Every removal was instead falsified directly against the tree: re-deleting .soldeerignore's /out, /cache, /dependencies or /docs would be wrong because those are produced locally (dependencies/forge-std-1.16.1/ exists after forge soldeer install, out/ after forge build), which is why they are kept; removing REUSE.toml's ".audit/**" would be wrong because .audit/scope.json is tracked (git ls-files confirms) and reuse lint reports 18/18 files covered on this head.
  • Oracle: the repository state, not the code. git ls-files --stage | awk '$1 == "160000"' returns empty (no gitlinks); .gitmodules and lib/ do not exist; foundry.toml sets libs = ['dependencies'] and soldeer.lock pins forge-std 1.16.1 while the deleted foundry.lock pinned 1801b054 = forge-std v1.14.0. Independent confirmation the pin can never become live: rainix CI's no-submodules check fails on a root .gitmodules or any committed gitlink.
  • Category check: issue Remove the submodule-era residue — dead foundry.lock, .gitmodules and lib/ references in a repo with no submodules #33 asks for (a) foundry.lock deleted, (b) REUSE.toml lines 9 and 19 removed, (c) .soldeerignore lines 6, 16, 18, 23 removed, (d) the build warning gone, (e) no reference to .gitmodules, lib/ or foundry.lock anywhere outside dependencies/, (f) CI green. Covered a, b, c, d, e — each with output transcribed above; line numbers were re-checked against the live files and all four matched the issue. (f) is CI's to report on this head. The issue's list is treated as the category, not an example set: the whole tree was swept for the residue shape, and the only hits outside dependencies/ are the six legitimate lib uses enumerated above, each read individually rather than pattern-matched.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated project file tracking rules to exclude the Foundry configuration file.
    • Removed obsolete ignore entries for generated and dependency-related files.
    • Simplified licensing metadata by removing outdated annotated paths.

This repo migrated from git submodules to soldeer and the migration was
never finished. There is no .gitmodules, no lib/ and no gitlinks on main;
dependencies resolve under dependencies/ per foundry.toml's
libs = ['dependencies'], with soldeer.lock as the live lockfile.

foundry.lock is Foundry's submodule lockfile. It still pinned lib/forge-std
at 1801b0541f4fda118a10798fd3486bb7051c5dd6 (forge-std v1.14.0) while the
build uses forge-std 1.16.1, and forge build emitted
"Warning: Dependency 'lib/forge-std' not found at expected path" on every
run. Nothing read the foundry.lock side, so nothing reconciled them.

Deleted:

- foundry.lock
- REUSE.toml annotation entries ".gitmodules" and "foundry.lock"
- .soldeerignore entries .gitmodules, /foundry.lock, /lib and /target
  (/target: this repo has no Rust — no Cargo.toml, no crates/, and target
  is not in .gitignore, so nothing produces one)

Left in place deliberately: .soldeerignore's .DS_Store, .vscode,
.pre-commit-config.yaml, /out, /cache, /dependencies and /docs are absent
from a clean checkout by design but present when soldeer push runs, so they
are correct ignores; REUSE.toml's ".audit/**" is live, .audit/scope.json is
tracked.

Configuration only. No Solidity source, no deployed bytecode, no audited
artifact changes. forge test is 8 passed before and after.

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: afec03ae-480d-456c-b351-e25c1e4ac581

📥 Commits

Reviewing files that changed from the base of the PR and between 3e218a3 and 94ebdf5.

⛔ Files ignored due to path filters (1)
  • foundry.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .soldeerignore
  • REUSE.toml
💤 Files with no reviewable changes (2)
  • .soldeerignore
  • REUSE.toml

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


Walkthrough

Repository metadata removes obsolete submodule-era paths from .soldeerignore and REUSE.toml. .soldeerignore adds /foundry.toml while retaining the other configured paths.

Changes

Dependency Reference Cleanup

Layer / File(s) Summary
Update dependency metadata
.soldeerignore, REUSE.toml
.soldeerignore removes .gitmodules, /foundry.lock, /lib, and /target, and adds /foundry.toml. REUSE.toml removes obsolete .gitmodules and foundry.lock annotations.

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

Merge Risk: ⚪ Minimal · up to 94ebd

This configuration-only cleanup removes obsolete submodule-era references without changing executable behavior; no actionable merge-blocking risk remains after normal checks and review.

Possibly related issues

  • rainlanguage/rain.vats.flare#2 — Covers the same stale .soldeerignore and REUSE.toml cleanup.
  • rainlanguage/rain.vats#334 — Covers removal of stale submodule-era entries.
  • rainlanguage/rain.factory#52 — Covers removal of .gitmodules and foundry.lock references.
  • rainlanguage/raindex#2834 — Covers the same stale metadata entries.
  • rainlanguage/rain.sol.binmaskflag#20 — Covers removal of stale submodule references.
  • rainlanguage/rain.lib.hash#16 — Covers removal of .gitmodules, foundry.lock, and /lib references.
  • rainlanguage/rain.lib.typecast#15 — Covers the same cleanup, with additional items outside this change.
  • rainlanguage/rain.math.float#258 — Covers the same metadata cleanup.
  • rainlanguage/rain.math.fixedpoint#29 — Covers removal of stale submodule references.
  • rainlanguage/rain.intorastring#20 — Covers the same references, without deleting foundry.lock.
  • rainlanguage/rain.lib.memkv#22 — Covers the same references, without deleting foundry.lock.
  • rainlanguage/rain.merkle#17 — Covers removal of stale annotations from REUSE.toml.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The changes match the cleanup issue except for adding /foundry.toml to .soldeerignore, which the linked issue does not request. Remove the unrelated /foundry.toml ignore entry unless a linked requirement explains why Soldeer must ignore this file.
Linked Issues check ❓ Inconclusive Reviewed files remove the stale annotations and ignore entries, but foundry.lock deletion cannot be verified because it was excluded by !**/*.lock. Provide reviewable evidence that foundry.lock was deleted and that no stale references or forge build warning remain.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies removal of stale lockfile, submodule metadata, and lib references, matching the pull request scope.
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 33-remove-submodule-residue

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.

@thedavidmeister
thedavidmeister merged commit c3a3856 into main Aug 17, 2026
4 checks passed
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.

Remove the submodule-era residue — dead foundry.lock, .gitmodules and lib/ references in a repo with no submodules

1 participant