bug(remappings
): unable to import Solidity file using auto-remappings, missing src/ suffix
#4717
Labels
A-compiler
Area: compiler
A-remappings
Area: remappings
C-forge
Command: forge
Cmd-forge-build
Command: forge build
P-normal
Priority: normal
T-bug
Type: bug
Milestone
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (388c3c0 2023-04-10T00:12:13.189631296Z)
What command(s) is the bug in?
forge test
Operating System
Linux
Describe the bug
I need to compile contracts with multiple
solc
versions (0.6.x and 0.8.x).I managed to do that successfully in my local environment like this:
So my project root directory has a structure like this:
My
.gitmodules
contains:And I have a
src-0_6_x/Imports.sol
file that imports the required files:When I run the following sequence of commands on my machine, it works flawlessly:
I need this to run on CI through Github Actions, so I modified the sample
test.yml
file to look like this:The issue is that on CI the 0_6_x build step fails:
From the file above, you can see I tried to set
FOUNDRY_PROFILE
in 3 different ways. I tried them individually though and the result is the same. It seems to be picking thesrc-0_6_x
directory as the source directory, but cannot find dependencies inlib-0_6_x
.The text was updated successfully, but these errors were encountered: