On Fri, Jul 20, 2012 at 1:04 PM, Mark Harrah <
dmha...@gmail.com> wrote:
>> (I do still have a custom doc task that runs Scaladoc a second time with a
>> smaller set of sources and a different output directory, but that's another
>> story.)
>
> You should be able to configure this without copying/pasting the 'doc' implementation (in case you are doing so and would prefer not to).
I am doing so, and it isn't too awful. So the following just comes
from my own desire to experiment and learn, rather than from any
actual pressing need.
I hit a roadblock while trying to following your suggestions at
Scalathon on avoiding the copy/paste.
As I said, in my custom doc task I'm passing only a subset of the
sources. But those sources refer to classes that *aren't* defined in
the subset. So when I call Scaladoc, I need to make sure that the
classpath includes the compiled versions of those classes, otherwise
doc generation fails with a million class not found errors.
But in Defaults.scala, in the body of the docTaskSettings method, we
see the following:
val cp = in.config.classpath.toList - in.config.classesDirectory
So it's removing exactly the thing I need included.
I don't see a way around this without patching sbt itself. Do you agree?
Also, I was getting this error:
[error] References to undefined settings:
[error] *:doc-smaller::configuration from *:doc-smaller
and I managed to get it to go away by adding:
configuration in docSmaller := Configurations.Compile
but I'm wondering if that's actually correct.