On 9/5/26 18:24, Matt M wrote:
-1 (binding)
I was hoping that my earlier on the indy cold reflection issue _might_
have been caught early enough to get the issue addressed before the
next release window; however, given that we are escalating from Groovy
6 being in beta to a first release candidate, I feel that I should
call this out as a blocking issue and be a voice of dissent.
I over looked your mail it seems - cannot find it either.
TL;DR: Given this is an RC, the issue surfaced with
`groovy.indy.cold.reflection` being enabled/on by default and how it
affects the callstack
(https://issues.apache.org/jira/browse/GROOVY-12354) [...]
The only variant where something like that is potentially hidden in
Groovy is when the call is done via invokedynamic or via direct call.
If the invocation happens through the meta class for example it cannot
be hidden.
If callsite caching is used (pre Groovy 6) then there is potentially a
runtime generated accessor method on the stack, that may show up in the
trace. And right now, with the cold path from Daniel`s latest change, a
accessor method may show up again. Then there are cases of proxying that
could cause that, maybe MethodHandle as well.
Just saying, that there is no 100% solution, but there should be one for
this specific case.
[...]
From an end user perspective, the new default for how Groovy handles
dynamic invocations is a very obscure compiler implementation detail,
runtime, not compiler. And invokedynamic not adding stuff on the
callstack is actually the new part compared to older versions. But yes,
that is a regression. I agree.
A series of things we can do for the overall situation would be:
* change the flag to not do the cold reflection path anymore by default.
But then, when would we ever turn that on then? It was supposed to be an
experimental version to be turned on for the final release.
* add @Hidden to the accessor Daniel added (generated bytecode only)
* change indy to invoke on cold path bypassing invokeReflective and use
method/accessor directly.
bye Jochen