Scala:“-”[dash,减号]命令不推荐使用,而支持“onFailure”,并将在0.14.0中删除
当我在Scala项目上执行Scala:“-”[dash,减号]命令不推荐使用,而支持“onFailure”,并将在0.14.0中删除,scala,sbt,scalac,Scala,Sbt,Scalac,当我在Scala项目上执行sbt编译-功能时,我得到一个神秘的警告: The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0 我不知道那个破折号/减号命令是什么,也不知道它可能在哪里被使用。在谷歌上搜索它是不可能的,同时也不可能将代码库变灰(只有/那么多//破折号/) 至少我知道它的定义。我在scala文档中也找不到任何内容。我想您正在查找以下内容: // commands with
sbt编译-功能时,我得到一个神秘的警告:
The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0
我不知道那个破折号/减号命令是什么,也不知道它可能在哪里被使用。在谷歌上搜索它是不可能的,同时也不可能将代码库变灰(只有/那么多//破折号/)
至少我知道它的定义。我在scala文档中也找不到任何内容。我想您正在查找以下内容:
// 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"
}
此外,还可以找到一些相关的问题和信息,特别是如何将-功能添加到scalac选项中。可能的重复我花了一点时间才真正理解这是一个重复,但最肯定的是:-现在我知道发生了什么。。。调用scalac的scalac而非sbt需要-feature标志。。好的:-)