This is an automated email from the ASF dual-hosted git repository.
jdaugherty pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git
The following commit(s) were added to refs/heads/8.0.x by this push:
new 56d081a856 Fix normalization script
56d081a856 is described below
commit 56d081a856a4442d4f76ea1caaf7dd78f6faf914
Author: James Daugherty <[email protected]>
AuthorDate: Sun Jul 12 00:44:45 2026 -0400
Fix normalization script
---
.../{normalize-annotations.groovy => normalize_annotations.groovy} | 6 ++++--
etc/bin/verify-reproducible.sh | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/etc/bin/normalize-annotations.groovy
b/etc/bin/normalize_annotations.groovy
similarity index 94%
rename from etc/bin/normalize-annotations.groovy
rename to etc/bin/normalize_annotations.groovy
index cd052dca18..3ba108f36a 100755
--- a/etc/bin/normalize-annotations.groovy
+++ b/etc/bin/normalize_annotations.groovy
@@ -90,7 +90,9 @@ List<String> splitTopLevel(String text) {
current.append(c)
} else if (c == ',' as char && depth == 0) {
parts << current.toString()
- current.setLength(0)
+ // new instance instead of setLength(0): setLength is only
declared on the
+ // package-private AbstractStringBuilder, which old Groovy
runtimes cannot invoke
+ current = new StringBuilder()
} else {
current.append(c)
}
@@ -130,7 +132,7 @@ String normalize(String text) {
// ---------------------------------------------------------------------------
if (!args) {
- System.err.println "Usage: normalize-annotations.groovy <source-dir>
[<source-dir> ...]"
+ System.err.println "Usage: normalize_annotations.groovy <source-dir>
[<source-dir> ...]"
System.exit 1
}
diff --git a/etc/bin/verify-reproducible.sh b/etc/bin/verify-reproducible.sh
index 466f37c059..92c49f2306 100755
--- a/etc/bin/verify-reproducible.sh
+++ b/etc/bin/verify-reproducible.sh
@@ -189,7 +189,7 @@ if [ -s diff.txt ]; then
# Annotation member order in class files is not semantically meaningful
and Groovy
# emits it nondeterministically for annotations copied from precompiled
classes
# (e.g. @DelegatesTo on trait methods), so canonicalize it before
comparing
- "${SCRIPT_DIR}/normalize-annotations.groovy" "firstSource" "secondSource"
+ "${SCRIPT_DIR}/normalize_annotations.groovy" "firstSource" "secondSource"
echo "✅ Normalized annotation member order for ${jar_file}"
set +e