paulk-asert commented on code in PR #2645:
URL: https://github.com/apache/groovy/pull/2645#discussion_r3672245049


##########
src/main/java/org/codehaus/groovy/control/CompilerConfiguration.java:
##########
@@ -424,6 +434,20 @@ public void setLogClassgenStackTraceMaxDepth(int 
logClassgenStackTraceMaxDepth)
      */
     private Set<String> scriptExtensions = new LinkedHashSet<>();
 
+    /**
+     * Consumer vetoes for {@link groovy.transform.stc.ClassTag @ClassTag} 
preemption under static
+     * compilation (GROOVY-12115). Preemption is declared by the API author
+     * ({@code @ClassTag(preempt=true)}) and contained to the declaring class; 
this set lets the
+     * consuming build veto it anyway. Entries use the same selector forms as
+     * {@code groovy.extension.disable}: a bare method name ({@code 
withDefault}) vetoes all
+     * overloads of that name, a signature form ({@code 
withDefault(Map,Class,Closure)}, simple or
+     * fully-qualified type names) vetoes the exact overload, and {@code *} 
vetoes all preemption.
+     * Additive injection (supplying an otherwise-mandatory token, such as for 
{@code asChecked})
+     * is never gated by this set. Seeded from the {@code 
groovy.classtag.preemption.disable}
+     * system property; empty (the default) honours declared intent. Never 
null.
+     */
+    private Set<String> classTagPreemptionDisabled = 
splitRespectingParens(getSystemPropertySafe("groovy.classtag.preemption.disable"));

Review Comment:
   Actually, given that it is rare, perhaps the global opt-out is enough. The 
thinking behind the list is that a Grails app using multiple plugins might want 
to upgrade some of those plugins and so be able to opt out just some of the 
changes plugins might make in newer versions. But if you can change some of the 
code, you can opt-out individual ones by swapping out of CompileStatic or 
whatever.



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