9

I'm using sbt 0.13.7 and Scala 2.11.4.

In my build.sbt, I have:

autoAPIMappings := true

and in a File.scala:

/** scaladoc link to [[scala.concurrent.duration.FiniteDuration]] */

When running sbt doc, I’m getting:

[warn] ...:5: Could not find any member to link for "scala.concurrent.duration.FiniteDuration".
[warn] /** scaladoc link to [[scala.concurrent.duration.FiniteDuration]] */
[warn] ^

Now, when I replace autoAPIMappings := true with:

apiMappings += (scalaInstance.value.libraryJar ->
                url(s"http://www.scala-lang.org/api/${scalaVersion.value}/"))

the compiler still gives the warning.

What could be a solution?

Michal Rus
  • 1,796
  • 2
  • 18
  • 27
  • 3
    It works with `autoAPIMappings := true`, `sbt 0.13.6` and `scala 2.11.2` – lisak Dec 21 '14 at 19:57
  • @lisak mind turning your comment as an answer? It worked fine for me. – Jacek Laskowski Dec 22 '14 at 20:54
  • That's rather a hint :-) It will probably be a bug in SBT 0.13.7 or scala 2.11.4 or that version combination. I think that the person who answers this question should identify that bug for it to qualify as an answer :-) – lisak Dec 22 '14 at 21:33
  • @JacekLaskowski, thanks for making the post more real, but, *please*, don't spoil my grammar, punctation and word play in the future. :) Thank you. – Michal Rus Jan 09 '15 at 15:04

1 Answers1

2

I wasn't able to reproduce this behavior using sbt 0.13.7 and Scala 2.11.4.

Do you have multi-project setup? If so make sure to explicitly add settings to each project, or define the common settings in ThisBuild scope.

project/build.properties

sbt.version=0.13.7

build.sbt

lazy val commonSettings = Seq(
  scalaVersion := "2.11.4",
  autoAPIMappings := true
)

lazy val root = (project in file(".")).
  aggregate(app).
  settings(commonSettings: _*)

lazy val app = (project in file("app")).
  settings(commonSettings: _*)

src/main/scala/Hello.scala

/** scaladoc link to [[scala.concurrent.duration.FiniteDuration]] */
object Hello extends App {

}
Eugene Yokota
  • 94,654
  • 45
  • 215
  • 319