Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jsvisa
Copy link
Contributor

@jsvisa jsvisa commented Dec 30, 2024

Motivation

Try to implement #6706

Solution

@jsvisa
Copy link
Contributor Author

jsvisa commented Jan 7, 2025

@grandizzy PTAL thanks.

Copy link
Collaborator

@grandizzy grandizzy left a 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)]
Copy link
Collaborator

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

forgetest_init!(can_prioritise_closer_lib_remappings, |prj, cmd| {

Comment on lines +73 to +76
// 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;
}
Copy link
Member

@zerosnacks zerosnacks Jan 7, 2025

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

Copy link
Member

@zerosnacks zerosnacks left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants