matrei opened a new pull request, #16831:
URL: https://github.com/apache/grails-core/pull/16831
## Description
`GspCompileStaticConfigSpec > the report for a spaceship comes before the
failure it does not prevent` fails in the Groovy Snapshot Canary of every pull
request against 8.0.x since 1 November, while it passes in CI:
```
template.metaInfo.compilationException.message.contains('General error
during canonicalization')
| | |
| | false
| template_1859544565: 29: [Static type
checking] - The type of [n] is not known here, and an operator cannot be
applied to it. ...
| expressionOut.print(n <=> 2)
| 1 error
```
The feature compiles `${n <=> 2}` with an untyped `n` under
`grails.views.gsp.compileStatic`, and required the compilation to fail twice:
with the page's report about `n`, and later with a general error during
canonicalization, which the report does not prevent. That later failure is the
compiler crash GROOVY-12560 (apache/groovy#3088) fixes: under static
compilation, `<=>` with a left operand of a type without a compare method
crashed the compiler. The fix went onto `GROOVY_5_1_X` (8499b55d2e) and
`GROOVY_6_0_X` (bb5f654bfc) on 1 November at 04:35 UTC, between the last canary
run the feature passed in (00:38) and the first one it failed in (05:03). The
canary builds the head of `GROOVY_5_1_X`, so the page now fails with its report
alone.
The feature now requires the report, and that it comes before the later
failure where Groovy still has that failure, as Groovy 5.1.3 does. Without the
change, the feature fails on 8.0.x once Grails moves to Groovy 5.1.4, and on
9.0.x with the next Groovy 6.0.
### Tests
- All tests of `grails-gsp-core` pass with Groovy 5.1.3, and so does
`codeStyle`.
- I did not run the feature against a Groovy with GROOVY-12560 locally. The
Groovy Snapshot Canary of this pull request does.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]