-
Notifications
You must be signed in to change notification settings - Fork 26
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
Soldeer generated remappings do infer contract directory #236
Comments
Hey, Thank you for reporting this, yea this is something we were somehow aware, will for sure look to implement the same detection as forge! |
Hey! Just wanted to point out that if you add the |
@beeb oh great, that removes most of the pain, then. I see the I'm not sure what logic forge uses, but I was guessing that it's something like a breadth first search on dir tree to first directory that has solidity files but no sibling directories do, then rooting at that. So something like: find deepest depth Does that sound sensible? |
let's try to explore that @silasdavis and see how it goes, also forge remappings might worth looking into as we said. |
thank you for picking this up |
I have checked the following:
Soldeer Version
soldeer 0.5.2
What Happened?
Foundry Forge seems to be able to infer the appropriate contract directory to suffix to a remapping, for example
forge remappings
generates:For a nested copy of
forge-std
.However if I ask Soldeer to manage my remappings it generates something like:
It's similar for other repositories where forge correctly detects a
/contracts
suffix.Without these remappings mamy imports are made non canonical, which is particularly irksome for
forge-std
since you need to have imports likeWhich is ugly and doesn't match any of the documentation. The situation is similar for other dependencies.
Perhaps I am missing something, since it is surprising other people would not be reporting this issue.
I could manually maintain my remappings but then each time I update a dependency version I'd have to update it in two places since soldeer places a version suffix in the directory name.
Expected Behavior
Instead of remappings like:
I would expect remappings like:
Reproduction Steps
Configuration
The text was updated successfully, but these errors were encountered: