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


##########
grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsExtension.groovy:
##########
@@ -202,9 +202,9 @@ class GrailsExtension {
 
     /**
      * Whether to enable Groovy's invokedynamic (indy) bytecode instruction 
for dynamic Groovy method dispatch.
-     * Disabled by default to improve performance (see GitHub issue #15293).
-     * When enabled, Groovy uses JVM invokedynamic instead of traditional 
callsite caching.
-     * To enable invokedynamic in build.gradle: grails { indy = true }
+     * Enabled by default on Grails 9 / Groovy 6. Groovy 4+ already prefers 
indy; Grails 7 disabled it
+     * for performance (#15293). Re-evaluate that default now that the line is 
on Groovy 6.
+     * To opt out: grails { indy = false }
      */

Review Comment:
   This Javadoc reads like a TODO ("Re-evaluate that default...") rather than 
documenting the current behavior. It would be clearer to describe the current 
default and reference the historical reason (issue #15293) without implying a 
future action.



##########
grails-doc/src/en/guide/introduction/whatsNew.adoc:
##########
@@ -32,6 +32,24 @@ Notable new features are included below.
 Grails {grailsMajorVersion} raises the standard build and runtime baseline to 
Java 21 and uses Gradle {gradleVersion}.
 The standard Grails BOM remains on Groovy {groovyVersion} and Spock 
{spockVersion}, while Micronaut-enabled Grails applications use 
Micronaut-specific BOM variants that align with Micronaut 5 and require JDK 25 
or later.
 
+==== Groovy invokedynamic enabled by default
+
+Grails 7 disabled Groovy invokedynamic for `GroovyCompile` tasks because of 
performance regressions on Groovy 4 
(https://github.com/apache/grails-core/issues/15293[#15293]).
+Grails 9 turns invokedynamic back on by default (`grails { indy = true }`).
+That matches Groovy 6's preferred dispatch and is the mode CI already 
exercises on the Groovy 6 line.

Review Comment:
   The current wording says indy is enabled "by default" but then shows `grails 
{ indy = true }`, which reads like users must configure it. Rephrase to make it 
explicit that `indy = true` is now the default (and therefore doesn’t need to 
be set).



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