当我在我的Scala项目上sbt compile -feature
时,我收到了一个神秘的警告:
The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0
我不知道破折号/减号命令是什么或者它可能在哪里使用。在谷歌上搜索它是不可能的,也不可能为它编写代码库(只有/ / / / / /破折/)。
如果至少我知道它的定义。我在scala文档中找不到任何内容。
答案 0 :(得分:3)
我想你正在寻找这个:
// commands with poor choices for names since they clash with the usual conventions for command line options
// these are not documented and are mainly internal commands and can be removed without a full deprecation cycle
object Compat {
def OnFailure = "-"
...
def OnFailureDeprecated = deprecatedAlias(OnFailure, BasicCommandStrings.OnFailure)
...
private[this] def deprecatedAlias(oldName: String, newName: String): String =
s"The `$oldName` command is deprecated in favor of `$newName` and will be removed in 0.14.0"
}
此外,可以找到各种相关的问题和信息here,尤其是如何将-feature
添加到scalac选项中。