【发布时间】:2016-01-20 09:18:59
【问题描述】:
是否可以使用 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
【问题讨论】:
-
This answer 描述必须安装Graphviz 才能使其正常工作,虽然提供的信息不包含任何暗示,但也许这已经是问题的原因?
-
Graphviz 安装在我的电脑上,我可以从命令行运行
dot -
我猜你不能轻易得到更多的日志。从同一个包中挖掘scala.tools.nsc.doc.html.page.diagram.DotDiagramGenerator 和DiagramStats:从DotDiagramGenerator 的第388 行和生成的图表可以获得以下见解:dot 似乎有时会忘记包含小
cs、os 和t图表中模板名称左侧的 s 会导致损坏的图像数量增加。