- publish-local a
- compile c
maybe? SI-7439
// a/src/main/java/A.java | |
package com.example; | |
public @interface A{} |
// b/src/main/scala/B.scala | |
@com.example.A | |
class B |
sbt.version=0.13.0-Beta2 |
lazy val baseSettings = seq( | |
resolvers += Opts.resolver.sonatypeSnapshots, | |
scalaVersion := "2.10.2" | |
) | |
baseSettings | |
lazy val a = project.settings( | |
organization := "com.example", | |
name := "a", | |
version := "0.1-SNAPSHOT", | |
autoScalaLibrary := false, | |
crossPaths := false | |
).settings(baseSettings: _*) | |
lazy val b = project.settings(baseSettings: _*).settings( | |
libraryDependencies += "com.example" % "a" % "0.1-SNAPSHOT" % "optional" | |
) | |
lazy val c = project.dependsOn(b).settings(baseSettings: _*) |
// c/src/main/scala/C.scala | |
object C extends App{ | |
println(new B()) | |
} |
[info] Compiling 1 Scala source to /Users/user/java-annotation-bug/c/target/scala-2.10/classes... | |
[warn] Class com.example.A not found - continuing with a stub. | |
[warn] Caught: java.lang.NullPointerException while parsing annotations in /Users/user/java-annotation-bug/b/target/scala-2.10/classes/B.class | |
[warn] Caught: java.lang.RuntimeException: bad constant pool index: 0 at pos: 483 while parsing annotations in /Users/user/java-annotation-bug/b/target/scala-2.10/classes/B.class | |
[error] error while loading B, class file '/Users/user/java-annotation-bug/b/target/scala-2.10/classes/B.class' is broken | |
[error] (class java.lang.RuntimeException/Scala class file does not contain Scala annotation) | |
[error] /Users/user/java-annotation-bug/c/src/main/scala/C.scala:3: B does not have a constructor | |
[error] println(new B()) | |
[error] ^ | |
[warn] three warnings found | |
[error] two errors found | |
[error] (c/compile:compile) Compilation failed |
Here's the output after the fix for
SI-7439
.No mention of the
NullPointerException
or the bad constant pool index, but something is still forcing the stub symbol. I'll take a further look.Thanks for the great test case!