Scaladoc built every time I try to publish?

I’m not sure if this is a problem with Sbt, or the Sbt build of the scalac project… but Sbt is rebuilding the Scala docs every time I do publishLocal. I know I can disable it using

set publishArtifact in (Compile, packageDoc) in ThisBuild := false

but I am wondering if I’m doing something wrong.


Hey @dragos :slight_smile:

I don’t think you’re doing something wrong; I think it’s the way it’s set up. I’ve also experienced the same behaviour and I guess the reason why Scaladoc is published is because Jenkins uses publishLocal to deploy Scala versions.

Perhaps @adriaanm | @SethTisue | @retronym can shed some light on this?

The surprising part is that it rebuilds it every time, even when there are no changes in any file on disk. Other Sbt projects seem to be detect that and not rebuild docs in such a case.

It’s published by default because that’s what sbt usually does and there was no particular reason to change it. I haven’t noticed unnecessary rebuilds yet (because I usually disable docs anyway when I try something out locally). It’s probably a bug.