Skip to content
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

Fix code coverage reports after introducing QueryDSL #9991

Closed
wants to merge 1 commit into from

Conversation

poikilotherm
Copy link
Contributor

@poikilotherm poikilotherm commented Oct 10, 2023

What this PR does / why we need it:
The Coveralls report is broken because JaCoCo's XML report file contains generated source files (and cannot be made to exclude them). The Coveralls Maven Plugin does not skip these classes and breaks of trying to read nonexisting source files.

Which issue(s) this PR closes:

Closes #9990

Special notes for your reviewer:

  • Figure out a way how to either exclude the class references or
  • Figure out a way how to make Coveralls skip ignored files (that have been excluded by some JaCoCo mechanism) or
  • Migrate to some other reporting of coverage that is compatible with this...

Suggestions on how to test this:
None

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Nope

Is there a release notes update needed for this change?:
Nope

Additional documentation:
None

Classed generated by QueryDSL are included in the JaCoCo report
because of not using an `@Generated` annotation that is of retention
scope "runtime" or "class".

This commit moves the APT dependency for QueryDSL to the Maven compiler
plugin configuration and annotation processor, which makes it
configurable.

Switching the annotation to be used with QueryDSL generated classes
fixes the code coverage reporting problem.

See also: querydsl/querydsl#3131 (comment)
See also: https://querydsl.com/static/querydsl/latest/reference/html/ch03s03.html
@poikilotherm
Copy link
Contributor Author

Without the changes here I definitely see the QueryDSL generated classes in the HTML report:

image

@github-actions
Copy link

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:9990-fix-jacoco-querydsl
ghcr.io/gdcc/configbaker:9990-fix-jacoco-querydsl

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

@poikilotherm
Copy link
Contributor Author

Superseded by #10041

@poikilotherm poikilotherm deleted the 9990-fix-jacoco-querydsl branch October 27, 2023 17:21
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.

QueryDSL APT processing break JaCoCo code coverage reporting
1 participant