raphw / byte-buddy

Runtime code generation for the Java virtual machine.
https://bytebuddy.net
Apache License 2.0
6.29k stars 807 forks source link

Should `jdk.attach` be transitive required under JPMS? #1500

Closed arjenzhou closed 1 month ago

arjenzhou commented 1 year ago

While using mockito for testing, bytebuddy is including as well. Under the condition of JPMS, module-info.java must require jdk.attach then bytebuddy agent can attach JVM, or No compatible attachment provider is available will be thrown. For this sake, should jdk.attach be transitive required under JPMS?

arjenzhou commented 1 year ago

https://github.com/mockito/mockito/issues/2952#issuecomment-1660765854

raphw commented 1 year ago

It should be, but we struggled to build Mockito with a module-info in place. I did not have time to look into that yet.