Skip to content

Remove the submodule-era residue — dead foundry.lock, and CLAUDE.md documenting a lib/ git submodule that does not exist #69

Description

@thedavidmeister

What is wrong

foundry.lock still pins a git submodule that does not exist, REUSE.toml and .soldeerignore still name it plus .gitmodules, and CLAUDE.md still tells the reader this repo's dependencies are a single git submodule under lib/, with a remapping that is not in foundry.toml and a path that is not in the tree. All of it is residue from the submodule → soldeer migration.

The CLAUDE.md half is the one that matters: it is the file an agent reads first, and it describes a dependency layout this repo has not had for a long time.

What foundry.lock is

foundry.lock is Foundry's git submodule lockfile. It records the commit each dependency vendored under lib/ is pinned to, so forge install / forge update can restore identical submodule revisions. It is only meaningful in a repo that vendors dependencies as git submodules.

Why it is dead here

There is no .gitmodules and no lib/ directory on main, and git ls-files --stage on a fresh clone reports zero gitlinks (mode 160000). Dependencies come from soldeer: foundry.toml sets libs = ['dependencies'], and soldeer.lock is the live lockfile for three packages, all under dependencies/:

  • forge-std 1.16.1
  • rain-interpreter-interface 0.1.0
  • rain-math-float 0.1.1

foundry.lock meanwhile still carries 1 submodule pin, for a lib/ path that does not exist in the tree:

{
  "lib/rain.interpreter.interface": {
    "rev": "58386557c270301d4eeaa0b101f2326b0cf4db68"
  }
}

Note it does not even pin forge-std, which the build does use — the file stopped tracking reality long before it stopped being committed.

Submodules cannot come back either: rainix CI runs a no-submodules check that fails on a root .gitmodules or any committed gitlink.

It is not silent

forge build emits one warning per entry in this file — verified on a fresh clone of main in the pinned rainix#sol-shell (forge 1.7.2-nightly, 43923a4):

Warning: Dependency 'lib/rain.interpreter.interface' not found at expected path

Everything dangling in this repo

Every reference below names a path that does not exist on main. All of it is one removal, not separate work.

The dead lockfile and its references

  • foundry.lock — the file itself
  • REUSE.toml line 17 — "foundry.lock", in the annotation path list
  • .soldeerignore line 17 — /foundry.lock

Submodule paths that no longer exist

  • REUSE.toml line 8 — ".gitmodules",. There is no .gitmodules in the tree and no gitlinks.
  • .soldeerignore line 7 — .gitmodules, same absent file.

Stale documentation asserting the same dead layout

  • CLAUDE.md lines 55–58 — under ### Dependencies:

    Single git submodule: lib/rain.interpreter.interface (interpreter interfaces, math libraries, utilities). Remapping in foundry.toml:

    rain.math.float/=lib/rain.interpreter.interface/lib/rain.math.float/src/
    

    Every claim in it is false. There is no submodule and no lib/. There are three soldeer dependencies, not one. foundry.toml has no remappings key at all — the real prefixes are the versioned soldeer ones in the tracked remappings.txt:

    forge-std-1.16.1/=dependencies/forge-std-1.16.1/
    rain-interpreter-interface-0.1.0/=dependencies/rain-interpreter-interface-0.1.0/
    rain-math-float-0.1.1/=dependencies/rain-math-float-0.1.1/
    

    and those are what src/ actually imports (rain-math-float-0.1.1/..., rain-interpreter-interface-0.1.0/...). Nothing in the repo imports rain.math.float/.

Other dangling references found while checking

  • REUSE.toml line 5 — ".gas-snapshot",. There is no .gas-snapshot here, and .gitignore does not list it either, so nothing in the tree or in CI produces one that the annotation could cover.
  • REUSE.toml line 11 — "audit/**/",. There is no audit/ directory.
  • .soldeerignore line 2 — .coderabbitai.yaml. No such file, and it is not gitignored.
  • .soldeerignore line 3 — .gas-snapshot, same absent file as above.
  • .soldeerignore line 12 — /audit, same absent directory as above.
  • slither.config.json line 3 — "filter_paths": "forge-std,openzeppelin,rain.math.float". rain.math.float is the submodule-era directory name; the directory is dependencies/rain-math-float-0.1.1/. openzeppelin names a dependency this repo does not have at all. CLAUDE.md line 71 restates the same list, so both need the same correction.

Deliberately not in scope. .soldeerignore also names .DS_Store, .vscode, .pre-commit-config.yaml and the build/publish outputs (/out, /cache, /dependencies). Those are absent from a clean checkout by design — OS junk, local developer files, or artifacts generated at forge soldeer install / forge build / devShell-entry time and therefore present when soldeer push runs. They are correct ignores and must stay.

Nothing else references any of it. .github/workflows/, flake.nix, foundry.toml, remappings.txt, .gitignore, src/ and README.md were grepped and are clean.

None of these references blocks its own deletion — reuse lint (the rainix-sol legal job) tolerates annotation paths that do not exist, and a .soldeerignore line for a nonexistent path is a no-op. That is exactly why they all survived.

Context

This is the tail of an unfinished migration, not a convention.

Pass 1 of this sweep covered the 17 repos that consume rain.solmem via soldeer. Every one of them carried residue, and each now has its own issue. This is pass 2: a further 17 rainlanguage repos with the same dangling entries — rain.deploy, rain.sol.codegen, rain.factory, rainix, rain.factory.deploy, rain.vats, rain.math.saturating, rain.math.binary, rain.pyth, rain.vats.flare, rain.sol.binmaskflag, rain.math.fixedpoint, rain.metadata, rain.verify.interface, rain.lib.typecast, rain.lib.hash, raindex.interface — of which ten still carry a dead foundry.lock: rain.deploy, rain.sol.codegen, rain.math.saturating, rain.math.binary, rain.sol.binmaskflag, rain.math.fixedpoint, rain.metadata, rain.lib.typecast, rain.lib.hash, raindex.interface. This issue covers raindex.interface only.

Deleting the file was never the whole job. The references outlive it silently, because not one of them fails anything.

rainlanguage/flow and rainlanguage/rain.tier.interface genuinely still use git submodules — live gitlinks, verified — so their .gitmodules and lib/ entries are correct and must be left alone.

This is documentation and configuration only. No Solidity source, no deployed bytecode and no audited artifact changes.

Done when

  • foundry.lock deleted
  • REUSE.toml lines 5, 8, 11 and 17 removed
  • .soldeerignore lines 2, 3, 7, 12 and 17 removed
  • CLAUDE.md lines 55–58 rewritten against the soldeer layout — three versioned soldeer dependencies under dependencies/, the real remappings.txt prefixes, no submodule and no lib/
  • slither.config.json line 3 and CLAUDE.md line 71 corrected to the real dependency directory names, with the openzeppelin entry dropped
  • forge build no longer emits Dependency '...' not found at expected path
  • no reference to .gitmodules, lib/ or foundry.lock remains anywhere in the tree outside dependencies/
  • CI green (rainix-sol test / static / legal)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions