10

I am generating the ScalaDoc HTML files for some SBT projects (in a Multi-Project configuration). If I execute doc in the SBT console, the documentation is generated nicely, but it is deployed in a standalone directory for each project. Since all the projects are quite related each other (in terms of package names), I would like to generate a unique ScalaDoc directory as output. It worths mentioning that I can not put all the sources together because of the dual compilation process required by some involved macros. Is there any workaround to do so?

neutropolis
  • 1,884
  • 15
  • 34
  • 2
    Hi Jesús! Have you looked at https://github.com/sbt/sbt-unidoc, a "sbt plugin to unify scaladoc/javadoc across multiple projects"? Disclaimer: I never tried it out, and I think it just simplifies running scaladoc on all sources at once; they document that it's compatible with `-Ymacro-no-expand`. – Blaisorblade Sep 11 '13 at 17:35
  • I add it to my backlog, because it seems really interesting for our case. Thanks! – neutropolis Sep 11 '13 at 17:43

1 Answers1

4

Unfortunately, scaladoc doesn't work with separate compilation since it cannot merge generated documentation. The docs have to be generated for all sources at once. The solution to the macro problem is to use -Ymacro-no-expand to not expand macros during scaladoc generation. See also https://issues.scala-lang.org/browse/SI-6812

Mark Harrah
  • 6,999
  • 1
  • 26
  • 31