问题标签 [scaladoc]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
scala - 是什么导致了这个 Scala 错误消息?
我似乎找到了一条奇怪的错误消息的方法。我正在存储密码,我有一条评论说
当我尝试为我的项目创建分发 jar 时,我收到了以下警告:
我将警告跟踪到 trait package scala.tools.nsc.ast.DocComments
,在那里我发现显然可以在 ScalaDoc 中放置某种变量。不幸的是,谷歌搜索“Scaladoc 中的变量”或“ScalaDoc 美元符号”没有任何用处。
有谁知道我使用不正确的功能以及如何在 ScalaDoc 注释中包含美元符号而不会收到警告?
scala - 在哪里下载最新的 Scala API 文档?
从 Scala 2.10.2 开始,我找不到它的 API 文档的下载链接。这是故意遗漏吗?我在哪里可以下载它?
或者,使用http://www.scala-lang.org/api/current/index.htmlscalac
生成相同命令的确切命令是什么?(例如,我不知道我必须包含哪些源 jar。)
scala - 标准库的 SBT Scaladoc 配置
我想将 ScalaDoc 设置为从 SBT 链接到标准库。我正在使用 0.12.4,但我很快就会切换到 0.13。此外,我想通过使用 0.13 的支持来简化设置。
最好的选择是使用0.13 的autoAPIMappings
自动映射:
应该支持它,scala-library
因为它的 pom设置info.apiURL
,这就是 SBT 读取的内容。
但是,这不起作用。既不String
是也不GenTraversable
是超链接。last
表明没有选项被添加到scaladoc
参数中。
所以:
- 我该如何解决
autoAPIMappings
? - 有替代品吗?
- 我没有观察到此功能有效,但也许我只需要另一个设置
info.apiUrl
. 想到了什么包?谷歌似乎没有帮助,如何查询具有某些属性的 maven 包,甚至如何在 pom 上进行全文搜索也不明显。find ~/.m2 ~/.ivy2 -name '*.pom' -type f|xargs grep info.apiUrl
在我的 2G 本地缓存中没有发现任何结果。
(这个问题可能看起来是SBT Scaladoc Configuration的一个副本,但它是针对更新的配置和不同的 SBT 版本,所以问题是不同的;此外,现有答案显示了一个已弃用的解决方案)。
scala - scaladoc 不像编译器那样编译
当我编译我的程序时,它编译得很好,但是,当我运行 scaladoc 时它不起作用。这是sbt compile
编译良好sbt doc
但不起作用的最小代码:
这是输出sbt doc
:
我正在使用 sbt 0.13 和 scala 2.10.2。如何使这段代码工作?
java - 如何为 IntelliJ 设置 Scala API 文档
Scala
使用 安装homebrew
,当我创建一个新的 Scala 项目时,我使用/usr/local/opt/scala/idea
带有正确符号链接的路径
IntelliJ 正确检测编译器和库,自动完成,编译和运行正常。
问题是 IntelliJ 没有检测到 Scala API 文档,即使 Javadocs 路径是正确的
目录的内容看起来也正确:
hanxue-mac:idea hanxue$ ls doc/scala-devel-docs/api index index.js package.html index.html lib scala hanxue-mac:idea hanxue$ ls /usr/local/opt/scala/idea doc lib src hanxue-mac:idea hanxue$ ls /usr/local/opt/scala/idea/doc/scala-devel-docs/api index index.js package.html index.html lib scala
这是我选择 Scala 类并按Ctrl+时的屏幕截图J
请注意,我在 和 中IntelliJ Idea 132.719
也有同样的问题IntelliJ Idea 12 CE
。我应该如何为 Scala API 设置 Javadocs 路径?
sbt - Can I use sbt's `apiMappings` setting for managed dependencies?
I'd like the ScalaDoc I generate with sbt to link to external libraries, and in sbt 0.13 we have autoAPIMappings
which is supposed to add these links for libraries that declare their apiURL
. In practice though, none of the libraries I use provide this in their pom/ivy metadata, and I suspect some of these libraries will never do so.
The apiMappings
setting is supposed to help with just that, but it is typed as Map[File, URL]
and hence geared towards setting doc urls for unmanaged dependencies. Managed dependencies are declared as instances of sbt.ModuleID
and cannot be inserted directly in that map.
Can I somehow populate the apiMappings
setting with something that will associate an URL with a managed dependency ?
A related question is: does sbt provide an idiomatic way of getting a File
from a ModuleID
? I guess I could try to evaluate some classpaths and get back File
s to try and map them to ModuleID
s but I hope there is something simpler.
Note: this is related to https://stackoverflow.com/questions/18747265/sbt-scaladoc-configuration-for-the-standard-library/18747266, but that question differs by linking to the scaladoc for the standard library, for which there is a well known File
scalaInstance.value.libraryJar
, which is not the case in this instance.
scala - scaladoc 的手册页在哪里?
查看http://www.scala-sbt.org/release/docs/Howto/scaladoc.html有提供 scaladoc 选项的示例-groups
和-implicits
。
关于 scaladoc (2.10) 选项的信息在哪里?就像一个手册页。我似乎在 docs.scala-lang.org 和 wiki.scala-lang.org 上都找不到它……
除了由 sbt 管理之外,我不使用 Scala 安装,所以我真的想要一个在线资源。
scala - sbt 忽略我的 scaladoc 设置
我正在尝试按照sbt 文档进行 scaladoc 生成。我有一个./build.sbt
用于一般设置的多项目(即与子项目聚合)构建。我在以下示例中添加了最后一个条目:
这没有任何影响。scaladoc 也没有尝试生成图表,也没有设置主文档标题,因此这些设置被忽略了。同样,如果我添加一个"-foobar"
选项,则不会出现错误。
如何解决这个问题(在build.sbt
,我不想进入project/Build.scala
,谢谢)
scala - 配置 scaladoc 以包含扩展方法
我可以通过指定隐式转换来配置 scaladoc 以包含来自隐式转换的方法吗?
例如给定
我可以在 scaladocbar
的文档中包含扩展方法Foo
吗?
scala - 定义 scaladoc 宏以在伴生对象中重用
我试图了解scaladoc 宏是如何 工作的。例如
我的印象是,这应该生成一个文档,其中包含 trait 和伴随对象的描述A Consumer simplifies resource management...
,并且还显示了apply
方法和trait
.
但是宏似乎在特征中不可用。虽然对象已正确记录,但特征文档仅显示宏名称$DESCR
, $KEY
, $VALUE
.