question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Distage fails when it encounters some annotated classes

See original GitHub issue

It 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:closed
  • Created 4 years ago
  • Comments:18 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
redvasilycommented, Dec 10, 2019

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.

0reactions
pshirshovcommented, Dec 10, 2019

Just out of curiosity, have you tried -noverify?

Also, I would like to look at your numbers with -Xshare:on

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gradle build fails on Lombok annotated classes - Stack Overflow
It seems like Gradle is not processing the annotations and can't find the getter/setter and log declarations. The project also runs without any...
Read more >
8 Tactics to Combat Imbalanced Classes in Your Machine ...
Let's get started. Class Imbalance. Find some balance in your machine learning. Photo by MichaEli, some rights reserved.
Read more >
Why does Dijkstra's Algorithm fail on negative weights?
So this algorithm fails to find the minimum distance in case of negative weights, so as an alternative Bellman-Ford algorithm is used to...
Read more >
Encounter - FHIR v5.0.0-cibuild
An Encounter encompasses the lifecycle from pre-admission, the actual encounter (for ambulatory encounters), and admission, stay and discharge (for inpatient ...
Read more >
Rich Get Richer and the Poor Get Prison: Ideology, Crime, and ...
This analysis of crime, offender characteristics, and criminal justice policies concludes that offense definitions and sentencing policies not only fail to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found