Skip to content

Improve error reporting of scanner issues in the Solidity and Yul parsers #10627

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

Closed
axic opened this issue Dec 16, 2020 · 3 comments
Closed

Improve error reporting of scanner issues in the Solidity and Yul parsers #10627

axic opened this issue Dec 16, 2020 · 3 comments
Labels
closed due inactivity The issue/PR was automatically closed due to inactivity. good first issue candidate Could be a "good first issue" but something is blocking it or it has open questions. stale The issue/PR was marked as stale because it has been open for too long.

Comments

@axic
Copy link
Member

axic commented Dec 16, 2020

Consider improving error reporting of scanner errors (including SemVerParser). Right now both Solidity and Yul parsers may just report "invalid token".

Originally posted by @cameel in #10625 (comment)

@cameel cameel added enhancement good first issue candidate Could be a "good first issue" but something is blocking it or it has open questions. labels Dec 11, 2021
@vinayman
Copy link

vinayman commented Jan 6, 2022

Hi @axic and @cameel - I saw this is a good first candidate issue and started doing some work specifically with the SemVer error reporting. You can see a draft PR here:

#12487

I just wanted to check before continuing work on this whether you are happy with the implementation and some questions:

  • I'm not sure what error codes we should throw or where I can find typical error codes - this is currently failing in the CI since for development purposes I've just made the error code 1465.
  • I added the BOOST_THROW_EXCEPTION in the catch since some invalid parsed expressions did not throw - is this okay or would this break some of the language compilation?

After your guidance I would be up for moving onto the other scanner errors to try improve the reporting.

Please let me know and thank you :)

@github-actions
Copy link

This issue has been marked as stale due to inactivity for the last 90 days.
It will be automatically closed in 7 days.

@github-actions github-actions bot added the stale The issue/PR was marked as stale because it has been open for too long. label Mar 14, 2023
@github-actions
Copy link

Hi everyone! This issue has been automatically closed due to inactivity.
If you think this issue is still relevant in the latest Solidity version and you have something to contribute, feel free to reopen.
However, unless the issue is a concrete proposal that can be implemented, we recommend starting a language discussion on the forum instead.

@github-actions github-actions bot added the closed due inactivity The issue/PR was automatically closed due to inactivity. label Mar 22, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed due inactivity The issue/PR was automatically closed due to inactivity. good first issue candidate Could be a "good first issue" but something is blocking it or it has open questions. stale The issue/PR was marked as stale because it has been open for too long.
Projects
None yet
Development

No branches or pull requests

4 participants