Changelog for Groovy 6.0.0-beta-1
Bug
- [GROOVY-11792] - for-in loop variable captured by closure/AIC sees final value, not per-iteration value
- [GROOVY-12125] - deleteDir() should treat symbolic links as leaves
- [GROOVY-12134] - @Delegate regression: fails to skip a final method inherited from a precompiled superclass
- [GROOVY-12139] - Primitive array Varargs Java incompatibility (fix needed also for classic bytecode)
- [GROOVY-12144] - AstNodeToScriptAdapter decompiler drops or corrupts several constructs when rendering AST back to source
- [GROOVY-12145] - JUnit 5 migration silently disabled ~195 test methods: base class removed but @Test not added
- [GROOVY-12146] - Regression of GROOVY-11715 - Unordered Annotation members
- [GROOVY-12148] - fix out-of-bounds read on dangling escape in decodeJsonString
- [GROOVY-12149] - Nondeterministic reflection order flows into generated bytecode, breaking reproducible builds
- [GROOVY-12154] - `@CompileStatic` lambda with a primitive-typed parameter targeting a generic functional interface fails at runtime with `LambdaConversionException`
- [GROOVY-12155] - decode process output streams using the native encoding
- [GROOVY-12163] - fix concurrent modification of ExpandoMetaClass mixinClasses
- [GROOVY-12186] - reject lone low surrogate in StreamingMarkupWriter.write
- [GROOVY-12190] - @TypeChecked switch on enum: unqualified case constants pass type checking but throw MissingPropertyException at runtime
- [GROOVY-12203] - False positive "name clash" for a valid override when a `? super` wildcard uses a type that declares the same type variable name
- [GROOVY-12213] - avoid decoding the request URI in HttpBuilder.appendQuery
- [GROOVY-12219] - Lazy iterators that prefetch remove the wrong element in DefaultGroovyMethods
Dependency upgrade
- [GROOVY-12170] - Bump JUnit to 6.1.2
- [GROOVY-12174] - Bump antlr to 4.13.2.8
- [GROOVY-12175] - Bump jackson to 2.22.1
- [GROOVY-12176] - Bump jline to 4.3.1
- [GROOVY-12177] - Bump ivy to 2.6.0
- [GROOVY-12178] - Bump maven-resolver-supplier-mvn4 to 2.0.20
- [GROOVY-12179] - Bump flatlaf to 3.7.2
- [GROOVY-12180] - Bump antlr to 4.13.2.9
- [GROOVY-12192] - Bump maven-resolver-supplier-mvn4 to 2.0.21
- [GROOVY-12193] - Bump logback to 1.6.1 (test dependency)
- [GROOVY-12194] - Bump log4j2 version to 2.26.1 (test dependency)
- [GROOVY-12195] - Bump spotbugs to 4.10.3 (build dependency)
- [GROOVY-12196] - Bump codenarc to 4.0.0 (build dependency)
- [GROOVY-12197] - Bump jarjar to 1.17.1 (build dependency)
- [GROOVY-12198] - Bump json-unit to 6.0.1 (test dependency)
- [GROOVY-12202] - Bump antlr to 4.13.2.10
- [GROOVY-12210] - Bump antlr to 4.13.2.11
- [GROOVY-12212] - Bump antlr to 4.13.2.12
Improvement
- [GROOVY-9192] - Implement optional parser error recovery for Parrot parser
- [GROOVY-12122] - Provide a Regex timeout facility
- [GROOVY-12124] - Modernize the TimeCategory date/time DSL: add a java.time flavor and a dequirked java.util.Date flavor
- [GROOVY-12127] - Improve benchmark framework: Runner calibration/Deterministic dispatch metrics/Cold instance-dispatch bench
- [GROOVY-12128] - loop contract checks fire at points that disagree with loop semantics
- [GROOVY-12129] - groovy-contracts: postcondition weaving mishandles implicit returns
- [GROOVY-12130] - groovy-contracts: inline postconditions read the wrong cached constant
- [GROOVY-12131] - OptimizerVisitor: detect constant nodes shared across classes
- [GROOVY-12132] - groovyc: print collected warnings on successful compilation (make -w effective)
- [GROOVY-12133] - Implement findBalancedGroups utility to support Regex Balanced Groups
- [GROOVY-12135] - groovy-contracts: Add a ThrowsIf annotation
- [GROOVY-12136] - groovy-contracts: allow @Requires to opt out of weaving the contract
- [GROOVY-12138] - emit invokedynamic call sites for property writes
- [GROOVY-12140] - box-identity divergence for primitive varargs with classic bytecode
- [GROOVY-12143] - GEP-27: lambda hoisting
- [GROOVY-12147] - Add locale-aware number, currency and percent formatting/parsing to the GDK
- [GROOVY-12150] - Decompiled AST view should show a closure's generated class name
- [GROOVY-12151] - hoist eligible closure bodies to a shared adapter @PackedClosures/flag (GEP-27 S1)
- [GROOVY-12153] - Fix AstNodeToScriptAdapter decompiler rendering fidelity for strings
- [GROOVY-12156] - chooseBestMethod returns candidates in identity-hash order, making static-compilation output path-dependent
- [GROOVY-12157] - Covariant bridge methods are emitted in hash order, not the order they are found
- [GROOVY-12158] - @AutoImplement generates methods in hash order, not the order they are found
- [GROOVY-12159] - Synthetic class-literal fields and accessors are emitted in hash order, not the order the literals were encountered
- [GROOVY-12160] - @AnnotationCollector emits collected annotation members in hash order when the collector is precompiled
- [GROOVY-12161] - Omit identity catch-all for try/catch without finally and slim exception bytecode
- [GROOVY-12162] - Harden and extend bytecode peephole optimization
- [GROOVY-12164] - Closure.call fast path misses closures with typed parameters (~6x slower via full metaclass dispatch)
- [GROOVY-12165] - 2-arg typed/untyped map iteration, guard fall-through at arity 2, ambiguous same-arity overloads, static decline
- [GROOVY-12168] - Improve exception handling consistency for numbers during JSON parsing
- [GROOVY-12169] - Improve syntax error messages and caret positions for missing ')', ']', and '}'
- [GROOVY-12171] - Improve GString syntax error when '$' is not followed by a valid interpolation
- [GROOVY-12173] - Left-factor parser rules to reduce lookahead on hot parse paths
- [GROOVY-12181] - Refactor async runtime and AST helpers introduced by GROOVY-9381
- [GROOVY-12182] - groovy-http-builder: confine requests (and redirects) to the base URI
- [GROOVY-12183] - Improve MarkdownSlurper resilience
- [GROOVY-12185] - Move classic call-site caching into optional groovy-callsite module *
- [GROOVY-12189] - JEP 181: replace bridge methods with nest-based access control (implementation tweak)
- [GROOVY-12191] - Scope indy SwitchPoint invalidation *
- [GROOVY-12199] - Replace ant-jarjar with com.gradleup.shadow for package relocation
- [GROOVY-12204] - Support check-only compilation (stop after a configurable compile phase)
- [GROOVY-12206] - Ingest type-use annotations when reading compiled classes
- [GROOVY-12207] - Consult package-info.class of dependencies during resolution
- [GROOVY-12208] - NullChecker: broaden null-guard recognition
- [GROOVY-12209] - NullChecker: track nullness through ?., ?:, and ternary results
- [GROOVY-12211] - Avoid full bytecode re-parse when completing NestMembers after class generation
- [GROOVY-12214] - STC: method reference should select the functional-interface overload over a Closure overload
New Feature
- [GROOVY-11947] - Add timing utility methods (timed, timedNanos) and Timed record to groovy-jdk
- [GROOVY-12115] - Reify a receiver's type argument as a Class parameter under @CompileStatic (@ClassTag)
- [GROOVY-12187] - Add SqlInjectionChecker type checker to detect quoted GString interpolation in SQL queries
Sub-task
- [GROOVY-12215] - Fat-free variants for collectMany, countBy, split, take/dropWhile, groupBy
- [GROOVY-12216] - Fat-free twins for the fold/reduce DGM methods (inject, injectAll)
- [GROOVY-12218] - Complete fat-free (functional-interface) twins for the array (`T[]`) forms of the GROOVY-12054 DGM methods
Task
- [GROOVY-12137] - experimental reflective cold tier for indy dispatch
* potentially breaking change (read issue for details - even minor differences are sometimes flagged as potentially breaking changes)