Skip to content

Ensure that the GlobalGrailsClassInjectorTransformation fails in the grails-core build if the wrong directory is passed#15799

Merged
jdaugherty merged 5 commits into
8.0.xfrom
rest-transform-fix
Jul 1, 2026
Merged

Ensure that the GlobalGrailsClassInjectorTransformation fails in the grails-core build if the wrong directory is passed#15799
jdaugherty merged 5 commits into
8.0.xfrom
rest-transform-fix

Conversation

@jdaugherty

Copy link
Copy Markdown
Contributor

After trying to build the 8.0.x build, it was not reproducible because the grails.factories file in grails-core was merged with grails-core & grails-gsp projects somehow. The only way I can see this happening is if there is an incorrect base directory or a missing directory. This change is meant to be a "catch all" to find these cases. The goal is to merge this and then retry the 8.0.0-M2 build and see if this helps.

…grails-core build if the wrong directory is passed
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 49.4955%. Comparing base (c8ca1eb) to head (e7e083e).
⚠️ Report is 31 commits behind head on 8.0.x.

Files with missing lines Patch % Lines
...ion/GlobalGrailsClassInjectorTransformation.groovy 80.0000% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##                8.0.x     #15799        +/-   ##
==================================================
+ Coverage     49.4560%   49.4955%   +0.0395%     
- Complexity      16640      16701        +61     
==================================================
  Files            1944       1947         +3     
  Lines           92379      92473        +94     
  Branches        16130      16152        +22     
==================================================
+ Hits            45687      45770        +83     
+ Misses          39594      39593         -1     
- Partials         7098       7110        +12     
Files with missing lines Coverage Δ
...ion/GlobalGrailsClassInjectorTransformation.groovy 52.3077% <80.0000%> (+4.4130%) ⬆️

... and 15 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@matrei matrei left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange that Gradle would have such a bug.


void "findSourceDirectory walks up to the project directory when base.dir is not set"() {
given: "no base.dir and a standard per-project compile target"
System.clearProperty('base.dir')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
System.clearProperty('base.dir')

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistent state I think we should always clear before running the test. I've added a RestoreSystemProperties to the top though.

jdaugherty and others added 3 commits July 1, 2026 07:28
Co-authored-by: Mattias Reichel <matrei@apache.org>
Co-authored-by: Mattias Reichel <matrei@apache.org>
Co-authored-by: Søren Berg Glasius <soeren@glasius.dk>
@testlens-app

This comment has been minimized.

@jamesfredley

Copy link
Copy Markdown
Contributor

Not surprising to me, unfortunately. But is is nice we can usually wrap it with a little duct tape and move forward thanks to Groovy.

@jdaugherty jdaugherty merged commit b86be15 into 8.0.x Jul 1, 2026
42 checks passed
@jdaugherty jdaugherty deleted the rest-transform-fix branch July 1, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants