Closed simon-something closed 2 years ago
Will take a look at this...
@cgewecke is there a grant for solidity-coverage somewhere? We've been using it quite a lot while working on Juicebox and I'd be happy to submit a proposal to help fund you!
@drgorillamd That's very kind of you. I should be able to look at this tomorrow and publish a patch to the beta as a short term solution.
RE grant funding...this project has lots of possible funding tbh.
@cgewecke I'm sure it has! Still, if something is created at some point, I think it would make sense for us to help
@drgorillamd This is fixed on the beta. You should be able to install and run (without needing yarn resolutions for anything) with:
yarn add solidity-coverage@beta
There is a sample report generated for juice-box here: https://lyrical-horn.surge.sh/contracts/index.html
If you see anything odd in the coverage - things reported as missing hits which you're certain get hit - just lmk and will check.
To fix the bug you ran into it was necessary to stop covering statements in some conditional expressions (due to solc 0.8.x's parsing strictness). This does not impact line or branch coverage - it's only relevant if you have multiple statements on a single line and there are very few circumstances where the first two measurements won't catch a missing execution path. And example might be:
return x; y = 5;
Great, working like a charm! Will sure let you know if we encounter strange behaviors, thank you very much
Hi, we're running into this error while trying to run coverage on Juicebox-V2 codebase (https://github.com/jbx-protocol/juice-contracts-v2) - v0.7.0 runs without issue while 0.8.0 returns the following error (I tried resolving solidity-parser to the latest version, without success neither). All our codebase is in solidity 0.8.6.
Anyone faced the same issue? Any clue on how to handle it? If not, we mostly want to use sol-cov0.8.0 to cover ternary operators, any alternative? Thank you:)