Skip to content

deps: migrate from git submodules to soldeer#237

Open
hardyjosh wants to merge 1 commit into
mainfrom
deps/migrate-to-soldeer
Open

deps: migrate from git submodules to soldeer#237
hardyjosh wants to merge 1 commit into
mainfrom
deps/migrate-to-soldeer

Conversation

@hardyjosh

@hardyjosh hardyjosh commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Adopts the soldeer dependency setup used by upstream rain repos
(st0x.deploy origin/main is the canonical reference). Replaces the
lib/ submodule tree with dependencies/ populated by forge soldeer install. CI no longer needs to recursively init submodules.

  • Available on soldeer (semver pinned): forge-std, @openzeppelin-contracts,
    rain-factory, rain-math-float, rain-intorastring, st0x-deploy, rain-vats.
  • rain-pyth not yet on soldeer (upstream still on submodules); pinned as a
    git source dep at the same revision the previous submodule pointed at.
    Its nested pyth-crosschain submodule (used by the pyth-sdk/ bridging
    remap) is inited explicitly in CI since soldeer doesn't recurse into
    git-source submodules.
  • pyth-sdk transitive through rain-pyth's vendored pyth-crosschain — single
    bridging remapping in foundry.toml.
  • rain.pyth's source still uses unversioned rain.math.float/ and
    rain.intorastring/ import prefixes; bridge those to the soldeer-pinned
    packages so its transitive resolution doesn't need rain.interpreter's
    submodule tree.
  • All source/test/script imports rewritten to versioned soldeer paths
    matching st0x.deploy's style (forge-std-X.Y.Z/src/...,
    @openzeppelin-contracts-X.Y.Z/..., rain-factory-X.Y.Z/src/..., etc.).
  • slither.config.json filter_paths switched from lib to dependencies.
  • REUSE.toml drops lib/** annotation and adds soldeer artifacts to the
    rain copyright block; unused MIT and Apache-2.0 LICENSES removed.
  • .gitignore ignores dependencies/.

Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com

Summary by CodeRabbit

  • Chores
    • Migrated dependency management from git submodules to Soldeer package manager for improved maintainability and cleaner repository structure.
    • Updated build configuration and all CI workflows to support the new dependency resolution and installation system.
    • Updated import statements across the codebase to reference properly versioned dependencies for better consistency and reliability.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@hardyjosh, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 27 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bc0adbea-3b79-4272-b8c4-eaaacd921399

📥 Commits

Reviewing files that changed from the base of the PR and between 41d50b3 and 70bd2dd.

⛔ Files ignored due to path filters (2)
  • foundry.lock is excluded by !**/*.lock
  • soldeer.lock is excluded by !**/*.lock
📒 Files selected for processing (115)
  • .github/workflows/deploy-subgraph.yaml
  • .github/workflows/manual-sol-artifacts.yaml
  • .github/workflows/rainix.yaml
  • .github/workflows/subgraph-test.yaml
  • .gitignore
  • .gitmodules
  • .soldeerignore
  • LICENSES/Apache-2.0.txt
  • LICENSES/MIT.txt
  • REUSE.toml
  • foundry.toml
  • lib/forge-std/.gitattributes
  • lib/forge-std/.github/CODEOWNERS
  • lib/forge-std/.github/dependabot.yml
  • lib/forge-std/.github/workflows/ci.yml
  • lib/forge-std/.github/workflows/sync.yml
  • lib/forge-std/.gitignore
  • lib/forge-std/CONTRIBUTING.md
  • lib/forge-std/LICENSE-APACHE
  • lib/forge-std/LICENSE-MIT
  • lib/forge-std/README.md
  • lib/forge-std/RELEASE_CHECKLIST.md
  • lib/forge-std/foundry.toml
  • lib/forge-std/package.json
  • lib/forge-std/scripts/vm.py
  • lib/forge-std/src/Base.sol
  • lib/forge-std/src/Config.sol
  • lib/forge-std/src/LibVariable.sol
  • lib/forge-std/src/Script.sol
  • lib/forge-std/src/StdAssertions.sol
  • lib/forge-std/src/StdChains.sol
  • lib/forge-std/src/StdCheats.sol
  • lib/forge-std/src/StdConfig.sol
  • lib/forge-std/src/StdConstants.sol
  • lib/forge-std/src/StdError.sol
  • lib/forge-std/src/StdInvariant.sol
  • lib/forge-std/src/StdJson.sol
  • lib/forge-std/src/StdMath.sol
  • lib/forge-std/src/StdStorage.sol
  • lib/forge-std/src/StdStyle.sol
  • lib/forge-std/src/StdToml.sol
  • lib/forge-std/src/StdUtils.sol
  • lib/forge-std/src/Test.sol
  • lib/forge-std/src/Vm.sol
  • lib/forge-std/src/console.sol
  • lib/forge-std/src/console2.sol
  • lib/forge-std/src/interfaces/IERC1155.sol
  • lib/forge-std/src/interfaces/IERC165.sol
  • lib/forge-std/src/interfaces/IERC20.sol
  • lib/forge-std/src/interfaces/IERC4626.sol
  • lib/forge-std/src/interfaces/IERC6909.sol
  • lib/forge-std/src/interfaces/IERC721.sol
  • lib/forge-std/src/interfaces/IERC7540.sol
  • lib/forge-std/src/interfaces/IERC7575.sol
  • lib/forge-std/src/interfaces/IMulticall3.sol
  • lib/forge-std/src/safeconsole.sol
  • lib/forge-std/test/CommonBase.t.sol
  • lib/forge-std/test/Config.t.sol
  • lib/forge-std/test/LibVariable.t.sol
  • lib/forge-std/test/StdAssertions.t.sol
  • lib/forge-std/test/StdChains.t.sol
  • lib/forge-std/test/StdCheats.t.sol
  • lib/forge-std/test/StdConstants.t.sol
  • lib/forge-std/test/StdError.t.sol
  • lib/forge-std/test/StdJson.t.sol
  • lib/forge-std/test/StdMath.t.sol
  • lib/forge-std/test/StdStorage.t.sol
  • lib/forge-std/test/StdStyle.t.sol
  • lib/forge-std/test/StdToml.t.sol
  • lib/forge-std/test/StdUtils.t.sol
  • lib/forge-std/test/Vm.t.sol
  • lib/forge-std/test/compilation/CompilationScript.sol
  • lib/forge-std/test/compilation/CompilationScriptBase.sol
  • lib/forge-std/test/compilation/CompilationTest.sol
  • lib/forge-std/test/compilation/CompilationTestBase.sol
  • lib/forge-std/test/fixtures/broadcast.log.json
  • lib/forge-std/test/fixtures/config.toml
  • lib/forge-std/test/fixtures/test.json
  • lib/forge-std/test/fixtures/test.toml
  • lib/openzeppelin-contracts
  • lib/rain.pyth
  • lib/st0x.deploy
  • remappings.txt
  • script/Deploy.sol
  • slither.config.json
  • src/abstract/BasePythOracleAdapter.sol
  • src/concrete/deploy/MorphoProtocolAdapterBeaconSetDeployer.sol
  • src/concrete/deploy/MultiPythOracleAdapterBeaconSetDeployer.sol
  • src/concrete/deploy/OracleRegistryBeaconSetDeployer.sol
  • src/concrete/deploy/PassthroughProtocolAdapterBeaconSetDeployer.sol
  • src/concrete/deploy/PythOracleAdapterBeaconSetDeployer.sol
  • src/concrete/oracle/MultiPythOracleAdapter.sol
  • src/concrete/oracle/PythOracleAdapter.sol
  • src/concrete/protocol/MorphoProtocolAdapter.sol
  • src/concrete/protocol/PassthroughProtocolAdapter.sol
  • src/concrete/registry/OracleRegistry.sol
  • test/abstract/OracleRegistryTest.sol
  • test/abstract/PythOracleAdapterTest.sol
  • test/lib/LibFork.sol
  • test/src/concrete/ProdFork.t.sol
  • test/src/concrete/deploy/MorphoProtocolAdapterBeaconSetDeployer.construct.t.sol
  • test/src/concrete/deploy/MultiOracleUnifiedDeployer.t.sol
  • test/src/concrete/deploy/OracleRegistryBeaconSetDeployer.construct.t.sol
  • test/src/concrete/deploy/OracleUnifiedDeployer.t.sol
  • test/src/concrete/deploy/PassthroughProtocolAdapterBeaconSetDeployer.construct.t.sol
  • test/src/concrete/deploy/PythOracleAdapterBeaconSetDeployer.construct.t.sol
  • test/src/concrete/oracle/MultiPythOracleAdapter.admin.t.sol
  • test/src/concrete/oracle/MultiPythOracleAdapter.fuzz.t.sol
  • test/src/concrete/oracle/MultiPythOracleAdapter.initialize.t.sol
  • test/src/concrete/oracle/MultiPythOracleAdapter.latestAnswer.t.sol
  • test/src/concrete/oracle/PythOracleAdapter.initialize.t.sol
  • test/src/concrete/oracle/PythOracleAdapter.latestAnswer.t.sol
  • test/src/concrete/protocol/MorphoProtocolAdapter.t.sol
  • test/src/concrete/protocol/PassthroughProtocolAdapter.t.sol
  • test/src/concrete/registry/OracleRegistry.t.sol
📝 Walkthrough

Walkthrough

This PR migrates the project from git submodules and embedded libraries to Soldeer-based dependency management. Foundry configuration is updated to resolve dependencies from a new dependencies/ directory, CI workflows are updated to install Soldeer packages, the embedded forge-std library is removed, and all import paths across source and test files are rewritten to reference versioned packages.

Changes

Dependency Management Migration to Soldeer

Layer / File(s) Summary
Foundry & dependency resolution configuration
foundry.toml, remappings.txt, REUSE.toml, .soldeerignore
profile.default.libs is set to ['dependencies'], remappings are replaced with new entries mapping pyth-sdk/, @openzeppelin/contracts/, and rain.* prefixes to dependencies/ paths; [dependencies.rain-pyth] git source with pinned rev is added; [soldeer] section sets recursive_deps = false; REUSE.toml annotations are updated to track new file paths.
Git configuration for dependency directory
lib/forge-std/.gitattributes, slither.config.json
dependencies/ directory is added to .gitignore; .gitmodules submodule entries for lib/rain.pyth, lib/st0x.deploy, and lib/openzeppelin-contracts are removed; slither filter paths change from lib to dependencies.
GitHub Actions workflows updated for Soldeer
.github/workflows/*.yaml (4 files)
All CI workflows replace submodules: recursive with fetch-depth: 0, add nix develop -c forge soldeer install, and manually initialize/update the nested lib/pyth-crosschain submodule under dependencies/rain-pyth-0.0.0-git before existing tasks.
Remove embedded forge-std library
lib/forge-std/* (removed)
The entire lib/forge-std/ directory tree—including source contracts, test suites, fixtures, and configuration—is deleted because forge-std is now fetched as versioned package forge-std-1.16.1 via Soldeer.
Update source file import paths to versioned packages
src/abstract/*.sol, src/concrete/deploy/*.sol, src/concrete/oracle/*.sol, src/concrete/protocol/*.sol, src/concrete/registry/*.sol
All imports are rewritten to use versioned package paths: @openzeppelin-contracts-5.6.1/, rain-factory-0.1.1/, rain-pyth-0.0.0-git/, rain-math-float-0.1.1/ instead of bare or generic paths.
Update test file import paths to versioned packages
test/abstract/*.sol, test/lib/*.sol, test/src/concrete/deploy/*.t.sol, test/src/concrete/oracle/*.t.sol, test/src/concrete/protocol/*.t.sol, test/src/concrete/registry/*.t.sol
All imports are rewritten to use forge-std-1.16.1/src/Test.sol and version-pinned OpenZeppelin (@openzeppelin-contracts-5.6.1/) and Rain Factory (rain-factory-0.1.1/) packages.
Update deployment script and other config files
script/Deploy.sol
Script import for Script is updated from generic forge-std/Script.sol to versioned forge-std-1.16.1/src/Script.sol.

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly Related Issues

  • #138: Addresses bare import paths in src/concrete/protocol/MorphoProtocolAdapter.sol by switching to versioned package paths.
  • #139: Resolves bare src/ imports in src/concrete/deploy/MorphoProtocolAdapterBeaconSetDeployer.sol by updating to versioned package paths.
  • #128: Fixes bare src/ imports in PassthroughProtocolAdapter.sol by switching to versioned dependency paths.
  • #141: Updates imports in src/concrete/deploy/OracleRegistryBeaconSetDeployer.sol from bare/legacy paths to versioned packages.
  • #142: Replaces bare src/ imports in src/concrete/deploy/PassthroughProtocolAdapterBeaconSetDeployer.sol with versioned package paths.
  • #143: Updates import paths in src/concrete/deploy/PythOracleAdapterBeaconSetDeployer.sol from bare to versioned packages.
  • #136: Updates imports in src/concrete/oracle/MultiPythOracleAdapter.sol to use versioned packages.

Poem

🐰 Hops through dependencies with glee,
From submodules tangled to Soldeer so free,
Versions pinned tight, imports aligned,
A cleaner dependency state we find!
The forge-std library bids farewell,
As versioned packages work quite well! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'deps: migrate from git submodules to soldeer' accurately describes the primary change—replacing git submodule dependencies with soldeer-based dependency management across the repository.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deps/migrate-to-soldeer

This was referenced May 26, 2026
Adopts the soldeer dependency setup used by upstream rain repos
(`st0x.deploy` `origin/main` is the canonical reference). Replaces the
`lib/` submodule tree with `dependencies/` populated by `forge soldeer
install`. CI no longer needs to recursively init submodules.

- Available on soldeer (semver pinned): forge-std, @openzeppelin-contracts,
  rain-factory, rain-math-float, rain-intorastring, st0x-deploy, rain-vats.
- rain-pyth not yet on soldeer (upstream still on submodules); pinned as a
  git source dep at the same revision the previous submodule pointed at.
  Its nested pyth-crosschain submodule (used by the `pyth-sdk/` bridging
  remap) is inited explicitly in CI since soldeer doesn't recurse into
  git-source submodules.
- pyth-sdk transitive through rain-pyth's vendored pyth-crosschain — single
  bridging remapping in foundry.toml.
- rain.pyth's source still uses unversioned `rain.math.float/` and
  `rain.intorastring/` import prefixes; bridge those to the soldeer-pinned
  packages so its transitive resolution doesn't need rain.interpreter's
  submodule tree.
- All source/test/script imports rewritten to versioned soldeer paths
  matching st0x.deploy's style (`forge-std-X.Y.Z/src/...`,
  `@openzeppelin-contracts-X.Y.Z/...`, `rain-factory-X.Y.Z/src/...`, etc.).
- slither.config.json `filter_paths` switched from `lib` to `dependencies`.
- REUSE.toml drops `lib/**` annotation and adds soldeer artifacts to the
  rain copyright block; unused MIT and Apache-2.0 LICENSES removed.
- `.gitignore` ignores `dependencies/`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@hardyjosh hardyjosh force-pushed the deps/migrate-to-soldeer branch from 41d50b3 to 70bd2dd Compare May 31, 2026 11:48
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.

1 participant