-
Notifications
You must be signed in to change notification settings - Fork 264
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
Line Coverage Decreases in v0.8.9 + viaIR=true #870
Comments
@doublesharp LOL samwitch is what I used to test that the 0.8.9 fix works and now it's broken again? Could you see if this resolves when you remove all the module.exports = {
skipFiles: ["BokkyPooBahsRedBlackTreeLibrary.sol", "test/"],
}; If (Be sure to run |
@cgewecke that was our VRF repo, this is the on-chain ERC1155 order book I made with @0xSamWitch for an idle RPG called Estfor Kingdom on Fantom :) The contracts do compile with the |
@doublesharp Ok cool will take a look... |
@doublesharp Yes it looks like viaIR is stripping the instrumentation in those locations - it must be getting swept out across a multi-line optimization. I guess if things were working in 0.8.6 with the special |
@doublesharp Update - I patched (#871) and published an experimental fix for this on the
It covers line 230 correctly... However, line 970 is still un-hit. I've added Can you verify that the tests actually exercise that code? (It might be a legit coverage gap.) |
Have published the patch in 0.8.10. Went back to the order book code and logged the values going into the for loop above line 970 It looks like they are always equal & the condition to enter the loop is never met, e.g this state or equivalent:
...for this: for (uint i = _index; i < _segments.length.sub(1); ++i) {
_segments[i] = _segments[i.inc()];
} Closing via #871 but please just ping if you have more info about this / that analysis is incorrect. Thanks for finding and reporting this bug. |
@cgewecke - thanks, those lines were actually uncovered. We missed them because the previous config I was using showed 100%, but I think that was incorrect. I have since updated to |
Yep, that's a bug. Patched in the latest release - could you try 0.8.11 (after running I got the result below locally for that section of code (and 100%). I also commented out the unneeded solc stuff in |
0.8.11 shows 100% coverage 👍 |
Using
[email protected]
with this repo https://github.com/PaintSwap/samwitch-vrf the line coverage is decreased from 100%..solcover.js
The lines that are "missing" coverage are:
The text was updated successfully, but these errors were encountered: