Distage fails when it encounters some annotated classes
See original GitHub issueIt seems that certain annotations can pose difficulties for distage.
The exception that I get is just this:
scala.reflect.internal.Symbols$CyclicReference: illegal cyclic reference involving class InterfaceStability
And somehow that’s a full stacktrace.
I get this when I try to make
some Kafka classes. In this particular case, the code is basically just this:
object StreamsResetterModule extends ModuleDef {
make[kafka.tools.StreamsResetter]
}
But this happens with many other classes from Kafka packages as well.
It seems that there’s something wrong with scala reflection and InterfaceStability annotations. (org.apache.kafka.common.annotation.InterfaceStability)
Here are those classes: https://github.com/apache/kafka/blob/c87fe9402cbebc460b42cd3dd7c268e5e6e659d9/core/src/main/scala/kafka/tools/StreamsResetter.java https://github.com/apache/kafka/blob/f98e176746d663fadedbcd3c18312a7f476a20c8/clients/src/main/java/org/apache/kafka/common/annotation/InterfaceStability.java
I guess it happens because of InterfaceStability annotation on the InterfaceStability annotation itself.
Right now you have to find workarounds for that. I.e. you can’t really let distage touch this InterfaceStability in any way: either you have to construct these dependencies “on the spot” or I guess hiding them under AnyRef should also work.
Issue Analytics
- State:
- Created 4 years ago
- Comments:18 (12 by maintainers)
Top GitHub Comments
I’ve tried
-noverify
and it does help to the tune of (10-15)%. Couldn’t get AppCDS to work on my Oracle JDK8, but I got it working on Java 13 (java.net from sdkman). Just switching to JDK13 improves startup performance to 600ms (which is faster than JDK8 with-noverify
), JDK13 + AppCDS is roughly 350ms for me. All and all pretty good.Just out of curiosity, have you tried
-noverify
?Also, I would like to look at your numbers with -Xshare:on