-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Bad symbolic reference
when a java classfile refers to an annotation inner class not on the classpath
#13523
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
Comments
Workaround: add a dependency on immutables: diff --git build.sbt build.sbt
index 0fddd4b..0c3ad48 100644
--- build.sbt
+++ build.sbt
@@ -11,6 +11,7 @@ lazy val app = project
resolvers += "d4j-snapshot" at "https://oss.sonatype.org/content/repositories/snapshots",
libraryDependencies ++= Seq(
"com.discord4j" % "discord4j-core" % "3.2.0-SNAPSHOT",
+ "org.immutables" % "value" % "2.8.2"
),
name := "Test bot", The ClassfileParser should ignore annotations without classfiles instead of crashing, just like scala 2 and java do. |
Bad symbolic reference
with discord4j (java library)Bad symbolic reference
when a java classfile refers to an annotation not on the classpath
6f32b62 should have fixed this but wasn't enough to deal with inner classes apparently. |
Bad symbolic reference
when a java classfile refers to an annotation not on the classpathBad symbolic reference
when a java classfile refers to an annotation inner class not on the classpath
A self-contained example: Value.java public @interface Value {
@interface Immutable {}
}
@Value.Immutable
abstract class Baz {} Test.scala object Test {
def baz: Baz = ???
}
|
This issue was picked for the Issue Spree 15 of May 3rd which takes place a week from now. @SethTisue, @griggt and @jodersky will be working on it. If you have any insight into the issue or guidance on how to fix it, please leave it here. |
Fix #13523: Survive missing Java inner annotation classfiles
Compiler version
Compiler version: 3.1.0-RC1
Minimized code
Output
Expectation
The code compiles (and run as expected) with the
Scala 2
compiler but give me this error message when compiling with theScala 3
compiler.The full code and
sbt
build file can be found here: https://github.com/n3f4s/scala3D4j3.2ErrorMWEThe text was updated successfully, but these errors were encountered: