-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implicit trailing /
in remappings causes file remappings to not resolve
#7527
Comments
seems like its caused by this foundry/crates/config/src/utils.rs Lines 172 to 180 in a16714e
foundry/crates/config/src/providers/remappings.rs Lines 216 to 226 in d94e3c6
this looks related https://github.com/foundry-rs/compilers/issues/47 |
This seems related to #6706
|
@zerosnacks i believe this issue was fixed in foundry-rs/compilers#49 and all tests passed in foundry CI #8377 so im guessing we are waiting for foundry main to update to the latest version of |
Thanks @BlazeWasHere, looks like that should fix it! I'll follow up on this once a new release of |
Marking as resolved as Line 161 in 4e4f35c
|
@zerosnacks doesnt look like original poc has been fixed with latest nightly (00ff367) + (37ea1e9). should i create a test case for this? $ DAPP_REMAPPINGS=$(cat remappings.txt) dapp test --verbosity 2
dapp-build: building with linked libraries
[...]
src/A.t.sol:ATest
├╴constructor
└╴test_basic_sanity()
├╴log_string("patched") (src/testPatched.sol:8)
[...]
"patched" # <--- this is good :)
$ forge test -vvv
[...]
Logs:
test # <--- this is bad :( |
Hi @BlazeWasHere, that would be appreciated. However I'm still not sure what the intended behavior here would be because Foundry does not support remapping individual files to my knowledge, only directories. |
@zerosnacks Correct that Foundry does not support individual file remappings, ideally it should ( |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (d1ab09d 2024-03-30T00:17:25.901579435Z)
What command(s) is the bug in?
No response
Operating System
Linux
Describe the bug
Using remappings.txt
when ran with forge (notice how its
src/test.sol/
instead ofsrc/test.sol
)expected behavior is similar to dapptools -- no trailing
/
is added to the remapping.simple testcase:
A.t.sol
test.sol
testPatched.sol
now we run forge:
with dapptools:
it does seem like this will be a breaking change if implemented due to some people who may be relying on this unexpected behavior, wdyt?
The text was updated successfully, but these errors were encountered: