You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
at scala.tools.nsc.doc.model.ModelFactory$$anon$19.<init>(ModelFactory.scala:908)
at scala.tools.nsc.doc.model.ModelFactory.makeAnnotation(ModelFactory.scala:903)
at scala.tools.nsc.doc.model.ModelFactory$EntityImpl$$anonfun$annotations$1.apply(ModelFactory.scala:100)
When calling a Java annotation in the sources, Scaladoc generates documentation for that annotation, and crashes with an argument/parmaeter list length mismatch.
find src build.sbt -type f | xargs tail -n 1000
==> src/main/java/foo/A.java <==
package foo;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
public @interface A {
int value();
}
==> src/main/scala/foo/B.scala <==
package foo
@A(123)
class B
This no longer causes a crash on 2.10.x since 50ee635e3c.
% RUNNER=scaladoc scala-hash '50ee635e3c' `find src -type f`
[info] 50ee635e3c => /Users/jason/usr/scala-v2.10.1-122-g50ee635
warning: dropping dependency on node with no phase object: pickler
model contains 4 documentable templates
% RUNNER=scaladoc scala-hash '50ee635e3c~1' `find src -type f`
[info] 50ee635e3c => /Users/jason/usr/scala-v2.10.1-121-gb7b4f87
warning: dropping dependency on node with no phase object: pickler
model contains 4 documentable templates
Exception in thread "main" java.lang.AssertionError: assertion failed:
But it still seems like a bug that documentation is generated for Java sources.
The text was updated successfully, but these errors were encountered:
@SethTisue said (edited on Apr 14, 2013 5:25:43 PM UTC):
re: Scaladoc processing Java sources, see #4826. (it's good that it handles them even to the limited extent that it does, and ideally it would handle them even better!)
@retronym said (edited on Apr 14, 2013 6:40:38 PM UTC):
In the compiler universe, it seems you can use Annotation#original. I use a macro and liberal casting to show that here:
Annotation handling in Scaladoc crashes in two related circumstances:
This no longer causes a crash on 2.10.x since 50ee635e3c.
But it still seems like a bug that documentation is generated for Java sources.
The text was updated successfully, but these errors were encountered: