-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump ByteBuddy to 1.11.16, use TestKit in agent integration test #2776
Conversation
|
193aa05
to
cb988ef
Compare
This commit bumps Byte-Buddy to 1.11.16, which makes the ad-hoc groovy integration testing of the Byte Buddy gradle plugin feature non functional due to breaking changes. After much trial-and-error, the best way to fix that integration test I found was to completely separate the test, as a inlined project in resources. The entire project can then be copied in the `buildDir` and executed using Gradle TestKit. In order to get access to the snapshot of code under test, some token replacement is used with the `files(@token@)` type of dependency. This allowed to resurface the importance of using the `reactor-tools` `-original.jar` version, as otherwise the ByteBuddy gradle plugin will refuse to use the reactor Plugin (which implements the shaded interface). See raphw/byte-buddy#833 for the original issue that lead to the previous code.
f7d27f7
to
705a001
Compare
@simonbasle this PR seems to have been merged on a maintenance branch, please ensure the change is merge-forwarded to intermediate maintenance branches and up to |
I've just discovered that the debug agent doesn't work with Java 17 class files. Transformation fails as the shaded version of ByteBuddy uses a version of ASM that doesn't support Java 17 bytecode. I think this issue will fix it as the new version of ByteBuddy supports Java 17 via an ASM upgrade. I thought it worth mentioning here in case anyone else hits the same problem. |
@wilkinsona were you able to verify that with snapshots by any chance? Also, byte-buddy has already had 3 new releases in the meantime. I'll upgrade again, today I hope. |
I just verified with 3.4.11-SNAPSHOT (via the 2020.0.12-SNAPSHOT bom) and it works. |
This commit bumps Byte-Buddy to 1.11.16, which makes the ad-hoc groovy
integration testing of the Byte Buddy gradle plugin feature non
functional due to breaking changes.
After much trial-and-error, the best way to fix that integration test
I found was to completely separate the test, as a inlined project in
resources. The entire project can then be copied in the
buildDir
andexecuted using Gradle TestKit.
In order to get access to the snapshot of code under test, some token
replacement is used with the
files(@TOKEN@)
type of dependency.This allowed to resurface the importance of using the
reactor-tools
-original.jar
version, as otherwise the ByteBuddy gradle pluginwill refuse to use the reactor Plugin (which implements the shaded
interface).
See raphw/byte-buddy#833 for the original
issue that lead to the previous code.