jamesfredley commented on code in PR #15557:
URL: https://github.com/apache/grails-core/pull/15557#discussion_r3337504061


##########
grails-views-gson/src/main/groovy/grails/plugin/json/builder/DefaultJsonGenerator.java:
##########
@@ -0,0 +1,37 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    https://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package grails.plugin.json.builder;
+
+/**
+ * Temporary fork of DefaultJsonGenerator until Groovy 2.5.0 is out.
+ * <p>A JsonGenerator that can be configured with various {@link 
JsonGenerator.Options}.
+ * If the default options are sufficient consider using the static {@code 
JsonOutput.toJson}
+ * methods.
+ *
+ * @see JsonGenerator.Options#build()
+ * @since 2.5
+ * @deprecated Use {@link groovy.json.DefaultJsonGenerator} instead.
+ */
+@Deprecated(since = "7.1", forRemoval = true)
+public class DefaultJsonGenerator extends groovy.json.DefaultJsonGenerator {

Review Comment:
   These three files are a Groovy 5 adaptation, not a base-branch mismatch: 
Groovy 5 made `groovy.json.StreamingJsonBuilder.StreamingJsonDelegate` 
package-private, so `JsonViewWritableScript` can no longer instantiate it 
directly (`new StreamingJsonBuilder.StreamingJsonDelegate(...)`). The shim 
re-exposes it under `grails.plugin.json.builder`. The cleaner fix is to rework 
`JsonViewWritableScript` so it doesn't instantiate `StreamingJsonDelegate` 
directly and then delete these shims - I've left that as a follow-up rather 
than expand this PR, but happy to do it here if you'd prefer.
   



##########
grails-test-examples/hibernate5/grails-hibernate-groovy-proxy/grails-app/domain/example/Customer.groovy:
##########
@@ -19,11 +19,9 @@
 
 package example
 
-import grails.compiler.GrailsCompileStatic
 import grails.persistence.Entity
 
 @Entity
-@GrailsCompileStatic

Review Comment:
   `@GrailsCompileStatic` was removed because of a Groovy 5 static-mapping 
closure `VerifyError` in the `mapping = { ... }` block, which traced to 
GROOVY-11907 / GROOVY-11968. Both are now fixed in 5.0.6+, so this is a good 
candidate to restore - it just needs a re-test of the hibernate5 example's 
integration build against the current `5.0.7-SNAPSHOT`. Flagging to restore 
once that's verified.
   



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