Closed mgroth0 closed 2 months ago
https://github.com/mgroth0/byte-buddy-1709
In order to reproduce, edit gradle-wrapper.properties
to specify the gradle version as 8.8
and execute ./gradlew run
, then change the gradle version to 8.9
and run again. You should see a no error in 8.8, and an error in 8.9.
You can disable validation by setting a custom entry point in byteBuddy { }
. Disable validation here.
Thanks @raphw . I disabled validation and this seemed to prevent the error.
A couple notes
byteBuddy { }
syntax doesn't apply for me. I just used ByteBuddy().with(TypeValidation.DISABLED)
.The closer you come to current versions of Gradle and Groovy or Kotlin, the less this is an issue. In the older versions, a lot of metadata in these classes is however corrupt, and since this can affect the outcome of instrumentation, this default is chosen.
Oh that's interesting. But you realize that it was the other way around here, right? Everything worked fine up to and including Gradle 8.8. Broke in Gradle 8.9.
There is of course regressions. The idea is that you cannot call a parameter of a method this
what is of course correct. Ideally, it captures only errors that are introduced by the user of Byte Buddy, but it does capture retained errors.
I had a working redefinition of
org.gradle.configurationcache.DefaultConfigurationCache
using the gradle 8.8 API. This fails at runtime with gradle 8.9 (the class was renamed toorg.gradle.internal.cc.impl.DefaultConfigurationCache
in 8.9).Reproducer below
Stack trace