foundry
foundry copied to clipboard
Absolute Import Paths Break Usage as Library
Component
Forge
Describe the feature you would like
The OP Stack contracts utilize the absolute import path style (relative to the project root). We decided to use this because it made refactors easier internal to the project.
For example:
import { Types } from "src/libraries/Types.sol";
There is no leading ..
and the src
directory is directly in the project root (vm.projectRoot()
).
Using this style breaks the ability to import the OP Stack contracts as deps into other contracts. See https://github.com/ethereum-optimism/optimism/issues/10202 for more information.
Is there any way to recusively enable remappings such that it solves this issue?
Additional context
No response
adding myself to this thread