-
Notifications
You must be signed in to change notification settings - Fork 91
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
7.1.1-7.1.2 seems to break coverage reporting on macos/ubuntu/windows with Node 10 (only) #220
Comments
@DavidAnson I'm confused, I would expect this to exit with |
Sorry, I wasn't clear. Coverage as measured by c8@7.1.1 is 100% across ubuntu/windows/mac and Node 10/12/14. Coverage as measured by c8@7.1.2 is <100% on ubuntu/Node 10 yet 100% on ubuntu/Node 14 per this run: https://github.com/DavidAnson/markdownlint/actions/runs/98145382 Locally (ubuntu/Node 12), it also reports 100% with c8@7.1.2. So why is c8@7.1.2 reporting <100% coverage on ubuntu/Node 10? And if c8 is correctly reporting <100% on ubuntu/Node 10, then why are the 4 lines it says are uncovered all "}" or a comment? My assumption was that the inconsistent coverage reporting indicated a problem since the code is the same in all cases and I don't think there's any OS/platform dependence. If this is something on my side, please let me know. |
I've pushed a commit to the I've pushed another commit to that branch to restore So why is coverage <100% only under Node 10 with c8@7.1.2 where it was 100% with c8@7.1.1? |
For completeness, I pushed another commit to the Summarizing: For the same code, c8@7.1.2 shows:
c8@7.1.1 shows 100% coverage for all of those configurations. |
There appears to be only one runtime change to I don't see why that would have this kind of effect, but the behavior difference between |
Your coverage is below 100%, for Node 10 in the old (passing) build too:
This will have been addressed in newer versions of Node.js, due to fixes in V8 (specifically this addressed edge cases like a single missing line after a With this |
What I might be tempted to do would be to split the coverage check into its own workflow, like this: https://github.com/yargs/yargs/blob/master/.github/workflows/coverage.yaml ... aside: Then only enforce coverage thresholds for the latest Node version (that way as we address bugs in V8, you can enforce thresholds based on the latest and greatest Node.js version). If you use a |
Ugh, I hadn’t noticed c8 was silently failing on Node 10 all along. :( Well, if this is a Node 10 bug, then it’s not a c8 bug and we can close this issue. I hope they fix it as Node 10 is still supported, but I will make other plans w.r.t. CI, perhaps splitting the Workflow as you suggest. Thanks for looking into this! |
@DavidAnson the V8 patches probably won't make there way all the way up to Node 10 (unfortunately), the tldr; is that the V8 in Node 10 is different enough from the V8 in newer Node versions that it's hard to float these patches... The nice thing about c8, is that it uses logic built right in to the V8 JavaScript engine, the crumby thing about c8 is that it uses logic built right in to the V8 JavaScript engine, so the turn around in patches can be a bit painful. I hope you find a reasonable workaround 👍 please don't be shy about opening issues on this repo |
Just FYI, my thinking is to update the Workflow thusly:
|
@DavidAnson I think it would be good to add a section to the README that covers this topic, it's definitely confusing that the engine matters so much. |
https://github.com/DavidAnson/markdownlint runs
c8
againstmaster
every day. After 10 successful runs with no changes to that branch, it started failing yesterday: https://github.com/DavidAnson/markdownlint/actions?query=workflow%3ACII created a fork of
master
withc8
locked to7.1.1
: https://github.com/DavidAnson/markdownlint/tree/c8711It passes: https://github.com/DavidAnson/markdownlint/actions/runs/98587182
I created a fork of
master
withc8
locked to7.1.2
: https://github.com/DavidAnson/markdownlint/tree/c8712It fails: https://github.com/DavidAnson/markdownlint/actions/runs/98587661
To be clear, that is the only difference between the branches:
GitHub aggressively terminates Actions with a failure, but this run demonstrates that the same
7.1.2
that fails on ubuntu-latest/Node 10 passes on ubuntu-latest/Node 14: https://github.com/DavidAnson/markdownlint/actions/runs/98145382The relevant command is:
c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 node test/markdownlint-test.js
. In the failure case, it reports 4 lines uncovered:helpers.js | 99.4 | 96.35 | 100 | 99.4 | 156,194,197,554
The corresponding file: https://github.com/DavidAnson/markdownlint/blob/c8712/helpers/helpers.js
The first of the corresponding lines:
https://github.com/DavidAnson/markdownlint/blob/34e2fd057648fda7559185e9aeaa68284f0d359b/helpers/helpers.js#L156
Please let me know if you need anything else from me.
The text was updated successfully, but these errors were encountered: