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

Skip Slang parser for solc versions that it does not support #1075

Merged
merged 4 commits into from
Sep 10, 2024

Conversation

ericglau
Copy link
Member

@ericglau ericglau commented Sep 9, 2024

Fixes #1074

Slang supports specific Solidity versions, currently up to 0.8.26. If the user's project is using 0.8.27, this causes error Unsupported language version '0.8.27'

As a longer-term solution, we may want to try falling back to the most recent version supported by Slang for parsing, but we should evaluate the implications of that further.

For now, we just skip the Slang code path (i.e. we won't remove non-struct NatSpec) for solc versions not supported by Slang.

@ericglau ericglau requested review from frangio and a team September 9, 2024 20:43
Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. Looks good to me.

This provides a new perspective on my comment here: #1060 (comment)
It's not just because of unsupported platforms but also unsupported compiler versions that we can't assume Slang to be present.

@frangio
Copy link
Contributor

frangio commented Sep 10, 2024

As a longer-term solution, we may want to try falling back to the most recent version supported by Slang for parsing

Intuitively this doesn't sound good to me.

@ericglau ericglau merged commit d43766a into OpenZeppelin:master Sep 10, 2024
11 checks passed
@ericglau ericglau deleted the slangversion branch September 10, 2024 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: Unsupported language version '0.8.27'
2 participants