-
Notifications
You must be signed in to change notification settings - Fork 2.2k
chore(forge): filter out unsupported solidity versions [solar] #12065
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
base: master
Are you sure you want to change the base?
Conversation
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, pending @grandizzy
cc @0xrusowsky
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.
makes sense, should we move the check in forge lint
itself so will warn on both build and lint commands?
hey @marcvernet31, thanks for the PR! just fyi i had this assigned to me, cause its part of a bigger solar-integration workstream. This isn't a linter-specific issue, as it impacts any component of the stack that use the solar compiler. the proposed solution in the PR works, but the scope is too narrow. What we want is to filter incompatible sources in the issue is that solar currently errors when you try to lower without sources, so we'd need to manually handle conditionals lowering everywhere, which is annoying... because of that, i opened paradigmxyz/solar#572 to make solar treat empty sources as a no-op. imo we should wait for that to merge, then implement the proper fix at the higher level. |
Hey @0xrusowsky, happy to try to finish this one once the solar fix is available. Just to clarify, we want to filter out all sources with incompatible Solidity version on |
@marcvernet31 the solar PR was merged this afternoon, and i went ahead and implemented the fix at the higher level as previously mentioned this means the checks you added in the tests you wrote are great though! we just need to adapt them a bit and remove the redundant code from your initial commit. could u take care of that, please? thanks a lot! |
please have a second look after the changes. @DaniPopes friendly ping as u may be opinionated on the approach |
from the output project parser
Motivation
As commented on this task #11668 (comment), Solar linter is not compatible with Solidity versions older that 0.8.0, which creates errors on execution.
closes #12008
Solution
lint.rs
PR Checklist