The GitHub Actions job "SiteMesh 2 Compatibility" on 
grails-core.git/9.0.x-remove-h5 has failed.
Run started by GitHub user borinquenkid (triggered by borinquenkid).

Head commit for run:
f4a8b902c852b60d31c081b8677f43414f3469ed / Walter Duque de Estrada 
<[email protected]>
build: remove Hibernate 5 support from grails-forge

grails-forge is the application generator's own separate build; it had a
fully parallel GormImpl.HIBERNATE5 option and GrailsDataHibernate5 feature
class alongside the Hibernate 7 one, defaulting to Hibernate 5.

Removes GrailsDataHibernate5 and the now-vacuous GrailsDataHibernateValidator
(which only existed to reject selecting both Hibernate implementations at
once - there is only one now). GormImpl.DEFAULT_OPTION becomes HIBERNATE7,
the HIBERNATE5 enum constant is removed, and the legacy "hibernate" CLI/API
alias now resolves to HIBERNATE7 instead. GrailsDataHibernate7 gets the
@Primary annotation GrailsDataHibernate5 held, since PostgreSQL/SQLServer/
MySQL/GraphqlGorm/AsyncGorm/DatabaseDriverFeature all constructor-inject the
concrete Hibernate feature class as their "default to Hibernate when no GORM
provider is chosen" fallback - all six were retyped from
GrailsDataHibernate5 to GrailsDataHibernate7. DatabaseMigrationPlugin's
artifact-selection ternary (hibernate7-dbmigration vs hibernate5-dbmigration)
collapses to the sole surviving artifact, and its stale hibernate5 doc URL
is fixed. The two Spring Security domain-class templates drop the now-moot
gorm-hibernate5 alternative from their feature check.

Explicitly requesting the removed value is rejected with a clear error
rather than silently substituted, at every layer: the "-d/--data"/"-g/--gorm"
CLI flag (GormImplConverter throws TypeConversionException; verified with a
real PicocliRunner.run() invocation, not just unit-level reasoning), and the
"--features gorm-hibernate5" feature-selection path (already throws
"The requested feature does not exist" from existing framework code, now
covered by a regression test). GormImpl.parse("hibernate5") returns null
(unresolvable) rather than matching any constant.

Fixes a pre-existing bug this surfaced in the test fixture BuildBuilder:
renderBuildSrc() built its Options with a constructor that silently dropped
whatever .gormImpl(...) the test had set, always falling back to
GormImpl.DEFAULT_OPTION. This was invisible while the default happened to
be HIBERNATE5 (the exact value every prior renderBuildSrc() test needed);
switching the default to HIBERNATE7 exposed it. render() already used the
correct constructor - renderBuildSrc() now matches it.

Verified with a full `./gradlew build` across every grails-forge module
(core, api, cli, analytics-postgres, and the netty/undertow/tomcat runners):
all tests pass, including new regression coverage proving gorm-hibernate5
and --gorm hibernate5 are now cleanly rejected rather than silently
mishandled.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

Report URL: https://github.com/apache/grails-core/actions/runs/35259040451

With regards,
GitHub Actions via GitBox

Reply via email to