Skip to content

rewrite test src/ imports to relative paths#452

Open
thedavidmeister wants to merge 1 commit intomainfrom
2026-05-05-issue-411-bare-src-imports
Open

rewrite test src/ imports to relative paths#452
thedavidmeister wants to merge 1 commit intomainfrom
2026-05-05-issue-411-bare-src-imports

Conversation

@thedavidmeister
Copy link
Copy Markdown
Contributor

@thedavidmeister thedavidmeister commented May 5, 2026

Summary

Bare src/ imports break when this repo is consumed as a Foundry git submodule — src/ resolves to the parent project's source directory, not this submodule's. Every test import now uses a relative path appropriate to its file's depth (../../src/..., ../../../src/..., or ../../../../src/...).

14 test files updated, 19 imports rewritten.

Closes #411.

Test plan

  • forge build clean (114 files compile)
  • full suite via rainix-sol-test — 31/31

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated import paths in test files from source-root style to relative paths for proper module resolution. No functional changes to test logic or contract behavior.

Bare `src/` imports break when this repo is consumed as a Foundry
git submodule — `src/` resolves to the parent project's source
directory, not this submodule's. Every test import now uses a
relative path appropriate to its file's depth.

Closes #411.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 90837218-5022-45da-bad3-d2ea79b9a9f4

📥 Commits

Reviewing files that changed from the base of the PR and between ceaea3c and d869a95.

📒 Files selected for processing (14)
  • test/abstract/FlowTest.sol
  • test/abstract/FlowTransferOperation.sol
  • test/abstract/FlowUtilsAbstractTest.sol
  • test/interface/IFlowV5.t.sol
  • test/interface/deprecated/v4/IFlowV4.t.sol
  • test/lib/LibStackGeneration.sol
  • test/src/concrete/Flow.construction.t.sol
  • test/src/concrete/Flow.context.t.sol
  • test/src/concrete/Flow.expression.t.sol
  • test/src/concrete/Flow.multicall.t.sol
  • test/src/concrete/Flow.preview.t.sol
  • test/src/concrete/Flow.signedContext.t.sol
  • test/src/concrete/Flow.time.t.sol
  • test/src/concrete/Flow.transfer.t.sol

Walkthrough

This PR updates import paths across 13 test files from bare src/... references to relative paths (e.g., ../../src/..., ../../../src/...), enabling the repository to function correctly when used as a Foundry submodule.

Changes

Import Path Corrections

Layer / File(s) Summary
Test Import Updates
test/abstract/FlowTest.sol, test/abstract/FlowTransferOperation.sol, test/abstract/FlowUtilsAbstractTest.sol, test/interface/IFlowV5.t.sol, test/interface/deprecated/v4/IFlowV4.t.sol, test/lib/LibStackGeneration.sol, test/src/concrete/Flow.construction.t.sol, test/src/concrete/Flow.context.t.sol, test/src/concrete/Flow.expression.t.sol, test/src/concrete/Flow.multicall.t.sol, test/src/concrete/Flow.preview.t.sol, test/src/concrete/Flow.signedContext.t.sol, test/src/concrete/Flow.time.t.sol, test/src/concrete/Flow.transfer.t.sol
All bare src/ import paths are replaced with relative paths. Files in test/abstract/, test/interface/, and test/lib/ use ../../src/...; files nested in test/src/concrete/ use ../../../src/.... No test logic or function behavior changed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related issues

  • #419: Related because it also involves test/interface/IFlowV5.t.sol import updates.
🚥 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 accurately summarizes the main change: rewriting test imports from bare src/ paths to relative paths, which is the core objective of this PR.
Linked Issues check ✅ Passed All 19 test import statements across 14 test files identified in issue #411 have been converted from bare src/ imports to relative paths, fully addressing the linked issue's requirements.
Out of Scope Changes check ✅ Passed All changes are scoped to updating import paths in test files as specified in issue #411; no unrelated modifications to contract logic or non-test code are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 2026-05-05-issue-411-bare-src-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.

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.

[GLOBAL-1] [LOW] Bare src/ imports break repo as Foundry submodule

1 participant