Open bkushigian opened 11 months ago
Yes this is a very valid bug report. The compiler sometimes creates many spurious diagnostics in this situation. Thanks for reporting. The general idea is to continue analysing the code even if there are errors. While this might be useful sometimes, it is not implement correct currently, leading to many spurious errors.
For example, compiling the uniswap v2 route UniswapV2Router02.sol
, where there is only a single problem in one of its imports. It should just report this, because it's the only problem:
error: 'foo' not found
┌─ /home/cyrill/mess/sub0/lib/contracts/libraries/TransferHelper.sol:12:3
│
12 │ foo = 0;
│ ^^^
I've been digging through a lot of parser diagnostics, and some relatively minor errors can cause huge outputs (thousands of lines for a single bug).
The mechanism that causes the blowup is:
While this isn't strictly a bug, I think minimizing this output is crucial for giving users good feedback.