You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "jdaugherty (via GitHub)" <gi...@apache.org> on 2026/10/20 17:36:29 UTC
[PR] Report a module's cli source set to JaCoCo so Codecov sees command code [grails-core]
jdaugherty opened a new pull request, #16689:
URL: https://github.com/apache/grails-core/pull/16689
## Description
Codecov has never seen the `cli` tier of grails-bootstrap, grails-core, grails-openapi, grails-scaffolding and grails-web-url-mappings: the `src/cli` companion source set that the `grails-plugin-cli` plugin adds, production code with its own `testCli` phase. `GrailsJacocoPlugin` collected every module's exec files, `testCli.exec` included, but fed the aggregate report only the main source set's classes and sources. With nothing to match the cli exec data against, the whole tier was absent from the report, and so from Codecov.
The plugin now adds the cli source set's classes and sources whenever a module has one, through live file collections, so a directory the source set gains after the aggregate task is realized (an eager build script, an IDE sync) is still reported. `GrailsJacocoPluginSpec` covers the cli source set being reported next to main and the late-added directory.
Cherry-picked from #16631 (9.0.x), where @borinquenkid found and fixed it while chasing patch coverage for the new `grails-datamapping-core` cli tier: Codecov's report for that branch grew by about 100 files once the cli tiers appeared. The gap is the same on every branch from 8.0.x up, where the plugin and its spec are byte-identical, so the fix lands here and merges up; the same two commits on the 9.0.x PR merge cleanly with it. 7.0.x has neither `GrailsJacocoPlugin` nor a cli source set and needs nothing.
Verified locally on this branch with `../gradlew :build-logic:test --tests org.apache.grails.buildsrc.GrailsJacocoPluginSpec` from `build-logic`: 7 specs pass.
## Contributor Checklist
### Issue and Scope
- [ ] This PR is linked to an existing issue. No issue exists; the background is above.
- [x] This PR addresses the **complete scope** of the change.
- [x] This PR contains a **single, focused change**.
- [x] This PR targets the **correct branch**: 8.0.x is the oldest branch with the plugin and a cli source set.
### Code Quality
- [x] I have **added or updated tests** that cover the changes introduced in this PR.
- [ ] I have verified that all existing tests pass by running `./gradlew build --rerun-tasks`. Only the build-logic spec was run locally; CI runs the rest.
- [x] My code follows the project's **code style** guidelines.
- [x] This PR does **not** include mass reformatting, style-only changes, or large-scale refactoring.
### Licensing and Attribution
- [x] All contributed code is provided under the Apache License 2.0; no new source files.
- [x] I have the necessary rights to submit this contribution.
### Documentation
- [x] No user-facing change: build logic only, nothing to document.
- [x] The PR description clearly explains **what** was changed and **why**.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Report a module's cli source set to JaCoCo so Codecov sees command code [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty merged PR #16689:
URL: https://github.com/apache/grails-core/pull/16689
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Report a module's cli source set to JaCoCo so Codecov sees command code [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on PR #16689:
URL: https://github.com/apache/grails-core/pull/16689#issuecomment-6297200063
@borinquenkid I'm going to go ahead and merge this - it's your change to fix the code coverage for cli. This seems like an obvious change that remains lazy, but we can iterate if anyone objects.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org