是否可以使用Scaladoc和SBT生成图表?

我试图在我的build.sbt中添加此行:scalacOptions in (Compile,doc) := Seq("-diagrams", "-diagrams-debug")
但我收到:
图生成运行时间细目:

diagrams model filtering
========================
count:        242 items
total time:   0 ms
average time: 0 ms
maximum time: 0 ms

diagrams model generation
=========================
count:        242 items
total time:   45 ms
average time: 0 ms
maximum time: 11 ms

dot diagram generation
======================
count:        89 items
total time:   24 ms
average time: 0 ms
maximum time: 3 ms

dot process runnning
====================
count:        89 items
total time:   590 ms
average time: 6 ms
maximum time: 512 ms

svg processing
==============
count:        89 items
total time:   269 ms
average time: 3 ms
maximum time: 88 ms

Broken images: 238
Fixed images: 0

如何获取有关“损坏的图像”的更多日志?

谢谢。

编辑:

命令last显示给我:
[debug] Calling Scaladoc with arguments:
[debug]         -diagrams
[debug]         -diagrams-debug
[debug]         -d
[debug]         /.../target/scala-2.10/api
[debug]         -bootclasspath
[debug]         /usr/lib/jvm/java-7-openjdk/jre/lib/resources.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/rt.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/jsse.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/jce.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/charsets.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/rhino.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/jfr.jar:/usr/lib/jvm/java-7-openjdk/jre/classes:/home/thibaud/.sbt/boot/scala-2.10.4/lib/scala-library.jar
[debug]         -classpath
... my classpath and my classes
[info] Main Scala API documentation successful.
[success] Total time: 18 s, completed 23 oct. 2015 15:10:32

最佳答案



由于这是标记为sbt的投票数最高的问题之一,因此我将尝试回答它。我尝试使用Scala 2.11.8和2.12.0-M4,但均不适合我。 Scaladoc图生成本身存在一些问题,而不是sbt。参见例如SI-7950: Running ScalaDoc with -diagram fails on OS X 10.9 (Mavericks)。我也尝试直接运行scaladoc,但仍然收到类似的错误消息。

我听到的一种理论是scaladoc对dot警告消息过于敏感。因此,使用以下代码包装dot是一种黑客手段:

#!/bin/bash
/usr/local/bin/dot "$@" 2> >( grep -v  "CoreText performance note:" >&2 )

使用上面的脚本对我不起作用。因此很可能目前无法实现。

关于Scaladoc图,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/33258261/

10-10 05:30