<error> 出现在 sbt doc 生成的文档中
<error> appearing in documentation produced by sbt doc
我正在尝试为我在 sbt/scala 中编写的一些代码生成文档。
这里是sbt配置文件
name := "My project"
version := "1.0"
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value
libraryDependencies += "org.apache.spark" %% "spark-core" % "1.2.0"
libraryDependencies += "org.apache.spark" %% "spark-graphx" % "1.2.0"
生成的文档没有错误,但生成的文档文件包含如下内容:
def getGraph(): <error>
def getLabelMap(): HashMap[<error>, String]
def setGraph(graph: <error>): Unit
def setLabelMap(map: HashMap[<error>, String]): Unit
所有 <error>
字段都属于 org.apache.spark.graphx 和 org.apache.spark 包(在上面的示例行中,我应该得到 Graph
而不是 <error>
, VertexId
,等等)。
我应该在 sbt 配置文件中添加什么来解决这个问题?
干杯
对于任何感兴趣的人,我找到了答案,我不得不添加这样的东西
scalacOptions in (Compile, doc) := Seq(
"-external-urls:scala=https://spark.apache.org/docs/1.1.0/api/scala",
"-external-urls:org.apache.spark=https://spark.apache.org/docs/0.9.1/api/graphx"
)
我正在尝试为我在 sbt/scala 中编写的一些代码生成文档。
这里是sbt配置文件
name := "My project"
version := "1.0"
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value
libraryDependencies += "org.apache.spark" %% "spark-core" % "1.2.0"
libraryDependencies += "org.apache.spark" %% "spark-graphx" % "1.2.0"
生成的文档没有错误,但生成的文档文件包含如下内容:
def getGraph(): <error>
def getLabelMap(): HashMap[<error>, String]
def setGraph(graph: <error>): Unit
def setLabelMap(map: HashMap[<error>, String]): Unit
所有 <error>
字段都属于 org.apache.spark.graphx 和 org.apache.spark 包(在上面的示例行中,我应该得到 Graph
而不是 <error>
, VertexId
,等等)。
我应该在 sbt 配置文件中添加什么来解决这个问题? 干杯
对于任何感兴趣的人,我找到了答案,我不得不添加这样的东西
scalacOptions in (Compile, doc) := Seq(
"-external-urls:scala=https://spark.apache.org/docs/1.1.0/api/scala",
"-external-urls:org.apache.spark=https://spark.apache.org/docs/0.9.1/api/graphx"
)