Skip to content

refactor: use relative paths for vendored Flare imports#35

Merged
thedavidmeister merged 1 commit into
mainfrom
2026-05-14-relative-vendor-imports
May 14, 2026
Merged

refactor: use relative paths for vendored Flare imports#35
thedavidmeister merged 1 commit into
mainfrom
2026-05-14-relative-vendor-imports

Conversation

@thedavidmeister
Copy link
Copy Markdown
Collaborator

@thedavidmeister thedavidmeister commented May 14, 2026

Summary

  • Drop the flare-smart-contracts/=src/vendor/... and flare-smart-contracts-v2/=... remappings from foundry.toml.
  • Rewrite source imports that used them to relative paths into src/vendor/.
  • Downstream soldeer consumers (e.g. rain.vats) no longer need a bridge remapping to pull these interfaces transitively — the relative paths resolve correctly whether rain.flare is at ./src/... or dependencies/rain-flare-X.Y.Z/src/....

Closes #34.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Reorganized dependency import structure across library contracts, interfaces, and test files to use consistent local vendor paths instead of package-style import mappings.

Review Change Stack

Drop the flare-smart-contracts/ and flare-smart-contracts-v2/ remappings; rewrite the source imports that used them to relative paths into src/vendor/. Downstream soldeer consumers no longer need a bridge remapping to pull these interfaces transitively.

Closes #34.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this May 14, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 085f2097-2f9f-4069-aaf8-778990044f20

📥 Commits

Reviewing files that changed from the base of the PR and between bd45eed and 0d0494f.

📒 Files selected for processing (8)
  • foundry.toml
  • src/err/ErrFtso.sol
  • src/interface/IGoverned.sol
  • src/lib/lts/LibFtsoV2LTS.sol
  • src/lib/price/LibFtsoCurrentPriceUsd.sol
  • src/lib/registry/LibFlareContractRegistry.sol
  • test/prod/FlareInterfacesProd.t.sol
  • test/src/lib/lts/LibFtsoV2LTS.t.sol

Walkthrough

This PR systematically converts all imports of vendored Flare interfaces from package-style paths (resolved via foundry.toml remappings) to direct relative paths. The foundry.toml remappings are removed, and all source and test files update their imports to reference src/vendor/ using relative paths.

Changes

Import Path Refactoring

Layer / File(s) Summary
Build configuration and source file imports
foundry.toml, src/err/ErrFtso.sol, src/interface/IGoverned.sol, src/lib/lts/LibFtsoV2LTS.sol, src/lib/price/LibFtsoCurrentPriceUsd.sol, src/lib/registry/LibFlareContractRegistry.sol
Removes the remappings block from foundry.toml that aliased flare-smart-contracts/ and flare-smart-contracts-v2/ namespaces. Source files update IFtso, IGovernanceSettings, FtsoV2Interface, IFeeCalculator, IFtsoRegistry, and IFlareContractRegistry imports to relative paths pointing into ../vendor/ or ../../vendor/.
Test file imports
test/prod/FlareInterfacesProd.t.sol, test/src/lib/lts/LibFtsoV2LTS.t.sol
Updates test files to import the same Flare interface contracts via relative paths under src/vendor/ instead of non-relative package paths.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-05-14-relative-vendor-imports

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 and usage tips.

@thedavidmeister thedavidmeister merged commit 1a9168d into main May 14, 2026
4 of 5 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.

Use relative paths for vendored Flare interface imports

1 participant