Copilot commented on code in PR #15770:
URL: https://github.com/apache/grails-core/pull/15770#discussion_r3483658784


##########
grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy:
##########
@@ -665,7 +668,7 @@ ${importStatements}
         }
 
         // Exactly one Grails BOM is ever applied (the BOMs are split by 
integration:
-        // default / hibernate5 / micronaut). A Micronaut project selects the 
Micronaut
+        // default / hibernate / micronaut). A Micronaut project selects the 
Micronaut
         // variant either by setting grails { bom = 'grails-micronaut-bom' } 
(auto-applied
         // as an enforcedPlatform by applyGrailsBom) or by opting out via 
grails { bom = null }
         // and declaring enforcedPlatform(grails-micronaut-bom) by hand. 
Either way the

Review Comment:
   `validateMicronautBom` is executed in an `afterEvaluate` block registered by 
`configureMicronaut(project)`, but `applyGrailsBom(project)` registers its own 
`afterEvaluate` later (because `configureMicronaut` is called before 
`applyDefaultPlugins`). That ordering means Micronaut projects that rely on 
`grails { bom = 'grails-*-micronaut-bom' }` auto-injection can fail validation 
because the BOM hasn't been injected yet when validation runs.



##########
grails-doc/src/en/guide/conf/micronaut.adoc:
##########
@@ -33,7 +33,7 @@ Here's an example build file:
 ----
 dependencies {
     // enforcedPlatform is required: it forces grails-bom-managed versions 
over the
-    // versions declared by the Micronaut platform (e.g. javaparser-core, 
Groovy 4),
+    // versions declared by the Micronaut platform (for example Groovy 5 and 
javaparser-core),
     // preventing binary incompatibilities at runtime.

Review Comment:
   In the Micronaut build.gradle example, the comment says enforcedPlatform 
forces "grails-bom-managed" versions, but the applied dependency is 
`grails-micronaut-bom` (or a Hibernate-specific Micronaut BOM). Since those 
BOMs can intentionally manage versions different from `grails-bom` (e.g., 
Groovy 5), this wording is misleading.



-- 
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]

Reply via email to