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

Change compile error printing/throwing logic #127

Merged
merged 3 commits into from
Oct 20, 2020
Merged

Conversation

iostat
Copy link
Member

@iostat iostat commented Oct 20, 2020

Currently, Chanterelle only throws a compilation error and fails if there is no compiler artifact for the module being compiled. In most cases (e.g., syntax errors, missing dependencies, pragma solidity vs compiler version mismatch) this is perfectly fine. However, there are certain classes of error which can give a "partial" artifact (i.e., has an ABI, but no bytecode). One such case is when you have more stack variables than the EVM can support. (try declaring 20 local bytes memory variables at the start of the case). In this case, there's nothing wrong with the Solidity code per se. The compiler can produce an ABI, source map, etc. for it -- it just can't produce EVM-compatible bytecode for it.

What would happen currently is that the errors wouldn't get logged, and you'd get a mysterious "Compiler output lacked an evm field". This change improves error logging and causes compilation to fail if any kind of error (i.e., with solidity severity >WARNING) is reported for a module.

@martyall martyall merged commit a918c3e into master Oct 20, 2020
@martyall martyall deleted the subtle-errors branch April 14, 2021 19:45
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.

None yet

2 participants