foundry icon indicating copy to clipboard operation
foundry copied to clipboard

Absolute Import Paths Break Usage as Library

Open tynes opened this issue 9 months ago • 1 comments

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

tynes avatar Apr 26 '24 18:04 tynes

adding myself to this thread

adraffy avatar Apr 28 '24 09:04 adraffy