-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat: allow remapping of solidity files #9604
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
@grandizzy PTAL thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you, makes sense, pending other review before merging
@@ -308,3 +320,131 @@ impl Provider for RemappingsProvider<'_> { | |||
Some(Config::selected_profile()) | |||
} | |||
} | |||
|
|||
#[cfg(test)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, another approach to write remapping tests is similar with
foundry/crates/forge/tests/cli/config.rs
Line 600 in 5e72c69
forgetest_init!(can_prioritise_closer_lib_remappings, |prj, cmd| { |
// Special handling for .sol file remappings, only allow one remapping per source file. | ||
if remapping.name.ends_with(".sol") && !remapping.path.ends_with(".sol") { | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From preliminary tests it doesn't appear we support remappings w/ Vyper sources
Not sure if this is known and / or worth spending time on implementing or something we should document as a limitation in the book (https://book.getfoundry.sh/config/vyper#5-limitations)
cc @klkvr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, small note on Vyper compatibility - not a blocker
Motivation
Try to implement #6706
Solution