You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "codeconsole (via GitHub)" <gi...@apache.org> on 2026/08/08 22:56:37 UTC
[PR] Compile GSP pages with the Java the project asked for [grails-core]
codeconsole opened a new pull request, #16118:
URL: https://github.com/apache/grails-core/pull/16118
Compiling GSP pages is forked, and a forked process runs whatever JVM it is given. Nothing gave it one, so it inherited the JVM running Gradle — meaning a project that declared a Java toolchain had its pages built by a different Java from everything else it built.
Nothing failed while building. The mismatch surfaced the first time a page was rendered:
```
UnsupportedClassVersionError: gsp_appindex_gsp has been compiled by a more recent version
of the Java Runtime (class file version 70.0), this version of the Java Runtime only
recognizes class file versions up to 69.0
```
`compileGroovyPages` now takes its launcher from the project's toolchain, so pages are compiled by the same Java as the rest of the project:
```groovy
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
```
What a page is compiled *for* follows what it is compiled *by*, unless the build sets `targetCompatibility` itself, which still wins.
The launcher is a `@Nested` input rather than an internal detail because the task is cacheable. The Java that did the compiling is part of what the result is, and without declaring it a cache entry produced by one Java was handed to a build asking for another — which survived a `clean`, so the usual workaround of pointing `JAVA_HOME` at the intended Java did not help either.
### Limitations
A project that declares no toolchain is still built by the JVM running Gradle. That is what compiling pages fell back to before and remains the right answer when nothing else was asked for, but it means a build relying on `JAVA_HOME` alone is unchanged by this.
--
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] Compile GSP pages with the Java the project asked for [grails-core]
Posted by "codeconsole (via GitHub)" <gi...@apache.org>.
codeconsole merged PR #16118:
URL: https://github.com/apache/grails-core/pull/16118
--
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] Compile GSP pages with the Java the project asked for [grails-core]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #16118:
URL: https://github.com/apache/grails-core/pull/16118#issuecomment-5228830259
## [Codecov](https://app.codecov.io/gh/apache/grails-core/pull/16118?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `71.42857%` with `2 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 52.4020%. Comparing base ([`a1e526f`](https://app.codecov.io/gh/apache/grails-core/commit/a1e526fd021afede1ec93a83eee6597fa9c024f5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`f813b48`](https://app.codecov.io/gh/apache/grails-core/commit/f813b48af6062adf7798dfb37200658c9c4bf19c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 19 commits behind head on 8.0.x.
| [Files with missing lines](https://app.codecov.io/gh/apache/grails-core/pull/16118?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [.../plugin/views/gsp/GroovyPageForkCompileTask.groovy](https://app.codecov.io/gh/apache/grails-core/pull/16118?src=pr&el=tree&filepath=grails-gradle%2Fplugins%2Fsrc%2Fmain%2Fgroovy%2Forg%2Fgrails%2Fgradle%2Fplugin%2Fviews%2Fgsp%2FGroovyPageForkCompileTask.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JhaWxzLWdyYWRsZS9wbHVnaW5zL3NyYy9tYWluL2dyb292eS9vcmcvZ3JhaWxzL2dyYWRsZS9wbHVnaW4vdmlld3MvZ3NwL0dyb292eVBhZ2VGb3JrQ29tcGlsZVRhc2suZ3Jvb3Z5) | 0.0000% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/grails-core/pull/16118?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
[](https://app.codecov.io/gh/apache/grails-core/pull/16118?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## 8.0.x #16118 +/- ##
==================================================
+ Coverage 52.3431% 52.4020% +0.0589%
- Complexity 18296 18309 +13
==================================================
Files 2036 2036
Lines 96347 96380 +33
Branches 16829 16837 +8
==================================================
+ Hits 50431 50505 +74
+ Misses 38492 38445 -47
- Partials 7424 7430 +6
```
| [Files with missing lines](https://app.codecov.io/gh/apache/grails-core/pull/16118?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...ls/gradle/plugin/views/gsp/GroovyPagePlugin.groovy](https://app.codecov.io/gh/apache/grails-core/pull/16118?src=pr&el=tree&filepath=grails-gradle%2Fplugins%2Fsrc%2Fmain%2Fgroovy%2Forg%2Fgrails%2Fgradle%2Fplugin%2Fviews%2Fgsp%2FGroovyPagePlugin.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JhaWxzLWdyYWRsZS9wbHVnaW5zL3NyYy9tYWluL2dyb292eS9vcmcvZ3JhaWxzL2dyYWRsZS9wbHVnaW4vdmlld3MvZ3NwL0dyb292eVBhZ2VQbHVnaW4uZ3Jvb3Z5) | `56.0606% <100.0000%> (+56.0606%)` | :arrow_up: |
| [.../plugin/views/gsp/GroovyPageForkCompileTask.groovy](https://app.codecov.io/gh/apache/grails-core/pull/16118?src=pr&el=tree&filepath=grails-gradle%2Fplugins%2Fsrc%2Fmain%2Fgroovy%2Forg%2Fgrails%2Fgradle%2Fplugin%2Fviews%2Fgsp%2FGroovyPageForkCompileTask.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JhaWxzLWdyYWRsZS9wbHVnaW5zL3NyYy9tYWluL2dyb292eS9vcmcvZ3JhaWxzL2dyYWRsZS9wbHVnaW4vdmlld3MvZ3NwL0dyb292eVBhZ2VGb3JrQ29tcGlsZVRhc2suZ3Jvb3Z5) | `25.9259% <0.0000%> (+25.9259%)` | :arrow_up: |
... and [6 files with indirect coverage changes](https://app.codecov.io/gh/apache/grails-core/pull/16118/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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