-
Notifications
You must be signed in to change notification settings - Fork 91
Improve foundry compilation #488
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
Conversation
montyly
left a comment
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.
I am wondering if we should invert the logic for --foundry-compile-all and do something like:
- If there is a foundry project detected, and the target is a
. solfile, then do the auto compile - Have the user use
compile-force-framework solcif they dont want to do that
Because most likely the direct solc call will not work for most of the user anyway in a foundry project
What do you think?
| """ | ||
| return False | ||
|
|
||
| @staticmethod |
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.
What if we dont make it abstract, to avoid having a code duplication for all platforms, to just return None?
- Remove the auto flag, crytic-compile will directly use the auto feature if its on .sol file + the working director is a known platform - Remove abstract from config to reduce code footprint
|
I made the proposed improvements (remove the auto flag, and make |
Add a new option
--auto-compilewhich can be used to compile a single file. At the moment it's implemented only for foundry. It will try to get information such as solc version to use, remappings... and pass them to solc. Example we want to run slither on a single file we can do from the root directoryslither src/MyFile.sol --auto-compile.Automatically skip compiling tests and scripts, to compile everything use
--foundry-compile-all.