1

ケースクラスを持つ Intellij IDEA SBT プロジェクトで scala 2.11.7 の scaladoc を生成するときに問題があります。たとえば、次のコードを使用します。

package main

/**
  *
 * @param a
  */
case class SomeClass(a: Int) {

}

scaladoc を生成しようとすると、例外がスローされます: エラー:

     while compiling: /Users/vicaba/Projects/scaladoc/src/main/scala/main/SomeClass.scala
        during phase: typer
     library version: version 2.10.4
    compiler version: version 2.10.4
  reconstructed args: -Yno-self-type-checks -classpath /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/jconsole.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/jce.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/ext/jfxrt.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/ext/zipfs.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/dt.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/jsse.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/jfxswt.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/resources.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/deploy.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/jfr.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/ext/localedata.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/ext/sunec.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/ext/nashorn.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/charsets.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/management-agent.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/javaws.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/ant-javafx.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/javafx-mx.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/ext/dnsns.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/tools.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/packager.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/plugin.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/rt.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/ext/cldrdata.jar/:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/sa-jdi.jar/:/Users/vicaba/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.7.jar/ -sourcepath /Users/vicaba/Projects/scaladoc/target/scala-2.11/src_managed/main:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/src.zip/:/Users/vicaba/Projects/scaladoc/src/main/java:/Users/vicaba/Projects/scaladoc/target/scala-2.11/src_managed/test:/Users/vicaba/Projects/scaladoc/src/test/scala:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/javafx-src.zip/:/Users/vicaba/Projects/scaladoc/target/scala-2.11/resource_managed/main:/Users/vicaba/Projects/scaladoc/src/test/resources:/Users/vicaba/Projects/scaladoc/target/scala-2.11/resource_managed/test:/Users/vicaba/Projects/scaladoc/src/main/scala-2.11:/Users/vicaba/Projects/scaladoc/src/test/java:/Users/vicaba/Projects/scaladoc/src/main/scala:/Users/vicaba/Projects/scaladoc/src/test/scala-2.11:/Users/vicaba/Projects/scaladoc/src/main/resources -doc-title scaladoc documentation -d /Users/vicaba/Projects/scaladoc/doc

  last tree to typer: Literal(Constant(()))
              symbol: null
   symbol definition: null
                 tpe: Unit
       symbol owners: 
      context owners: object SomeClass -> package main

== Enclosing template or block ==

ModuleDef( // object SomeClass in package main
  <module> <synthetic>
  "SomeClass"
  Template(
    runtime.this.AbstractFunction1[Int, SomeClass] // parents
    ValDef(
      private
      "_"
      <tpt>
      <empty>
    )
    // 2 statements
    DefDef( // def <init>: <?> in object SomeClass
      <method>
      "<init>"
      []
      List(Nil)
      <tpt>
      Block(
        Apply(
          super."<init>"
          Nil
        )
        ()
      )
    )
    DefDef( // final override def toString: <?> in object SomeClass
      <method> final override <synthetic>
      "toString"
      []
      List(Nil)
      <tpt>
      "SomeClass"
    )
  )
)

== Expanded type of tree ==

TypeRef(TypeSymbol(final abstract class Unit extends AnyVal))

uncaught exception during compilation: scala.reflect.internal.MissingRequirementError
error: fatal error: class scala.annotation.serializable in compiler mirror not found.
two errors found

この例では、scaladoc は正常に生成されますが、私が持っている別の大きなプロジェクトでも、このエラーがスローされ、何も生成されません。これは 2.10.4 を使用する sbt と 2.11.7 を使用する私のプロジェクトの問題でしょうか?

4

0 に答える 0