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

Linter/Compiler: output more than one syntactic error at the same time #160

Open
chrissiwaffler opened this issue May 22, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@chrissiwaffler
Copy link
Contributor

Is your feature request related to a problem? Please describe.
When compiling or linting, we can only output one compile error, which means that there is at least one syntactic error in the smart contract.
But there could be more syntactic errors which we cannot show to the user at the same time.

Describe the solution you'd like
something like: catch the errors, but progress with checking the AST

Describe alternatives you've considered
-/-

Additional context
come up from this PR

@nielstron nielstron added the enhancement New feature or request label May 25, 2023
@chrissiwaffler
Copy link
Contributor Author

it would be also nice that the linter shows warnings of the compiler, such as #172

@nielstron
Copy link
Contributor

The current structure relies heavily on raising exceptions. Maybe we can instead use the python built-tin logging library to log errors. This would include warnings, errors, etc. If any error was logged, the compilation pipeline will abort at some point, but all errors logged until then can be displayed i.e. by a linter.

@nielstron
Copy link
Contributor

A useful first step for this would be error reporting inside the typing system: for a lot of type related errors, compilation can likely continue, just choosing either of the applied types. This would allow for several errors. During compilation, after each step it should be checked whether an error remains and the compilation stopped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants