Skip to content

Workaround for Issue 21119 - Disable -betterC for coverage builds#11522

Merged
WalterBright merged 2 commits intodlang:masterfrom
MoonlightSentinel:backend-coverage
Aug 6, 2020
Merged

Workaround for Issue 21119 - Disable -betterC for coverage builds#11522
WalterBright merged 2 commits intodlang:masterfrom
MoonlightSentinel:backend-coverage

Conversation

@MoonlightSentinel
Copy link
Copy Markdown
Contributor

because -betterC apparently breaks coverage generation

@dlang-bot
Copy link
Copy Markdown
Contributor

Thanks for your pull request and interest in making D better, @MoonlightSentinel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
21119 normal Code coverage checker is not instrumenting backend source files

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#11522"

@MoonlightSentinel
Copy link
Copy Markdown
Contributor Author

MoonlightSentinel commented Aug 6, 2020

Temporarily removing auto-merge to check if everything works as expected with CodeCov.

@MoonlightSentinel
Copy link
Copy Markdown
Contributor Author

Also needed to update the source file paths s.t. the *.lst are named relative to the srcdirectory (which was already done for lexer and dmd).

@MoonlightSentinel
Copy link
Copy Markdown
Contributor Author

MoonlightSentinel commented Aug 6, 2020

CodeCov works now and reports a slight coverage increase:

2020-08-06 15 12 15 codecov io 85a982a61a46

CodeCov expects *.lst files named relative to the src directory
because `-betterC` apparently breaks coverage generation
@WalterBright
Copy link
Copy Markdown
Member

Thank you! This is great.

@WalterBright WalterBright merged commit 7b71ad5 into dlang:master Aug 6, 2020
@WalterBright
Copy link
Copy Markdown
Member

@MoonlightSentinel @wilzbach -cov requires linking with druntime, and -betterC explicitly must not require druntime. This is not a bug in the backend, and this fix is not a workaround, it's a fix.

@MoonlightSentinel MoonlightSentinel deleted the backend-coverage branch June 20, 2021 19:54
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.

4 participants