-
Notifications
You must be signed in to change notification settings - Fork 794
fix(solc): convert source paths on windows #1540
fix(solc): convert source paths on windows #1540
Conversation
gotta love windows. i wonder if we've been doing things the wrong way all this time, or if it's just full of footguns? how can we avoid these in the future? |
I guess the main problem is/was I've never worked with windows and just didn't know any better lol since windows also supports trying to sort things out here foundry-rs/foundry#2531 and make sure everything passes now, getting some weird failures that only happen in the cross compile tests... |
smol lint issue otherwise merging |
lint issue is fixed here #1541 I'd like to keep this open until foundry-rs/foundry#2531 passes this is incredible tedious lol for some reason a random fuzzing test keeps failing randomly... |
1f8084b
to
ef4fab1
Compare
@gakonst this is ready now, it will spit out |
Motivation
this fixes yet another path issue on windows which can result in duplicate (
src\\File.sol
andsrc/File.sol
) artifactsRef https://github.com/foundry-rs/foundry/runs/7586758672?check_suite_focus=true
solc uses unix style paths
/
, if it tries to resolve an importsrc/File.sol
it checks the VFS for a corresponding source,src\\File.sol
does not necessarily match so it will resolve from disk which results in duplicated entries in the output.Solution
convert source paths to
/
on windows before invoking solcfoundry tests: foundry-rs/foundry#2531
PR Checklist