Scala: the command `-` [dash, minus] is deprecated in favor of` onFailure` and will be removed at 0.14.0

When I execute sbt compile -feature in my Scala project, I get cryptic warnings:

 The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0 

I do not know what the dash / minus command is or where it may be used. Finding it on google is impossible, as well as grepping code bases for it (there is only / so // many // dashes /).

If I knew where it is defined. I could not find anything in the Scala document.

+8
scala sbt scalac
source share
1 answer

I think you are looking for this:

 // 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" } 

Source here

You can also find a view here , especially how to add -feature options to scalac.

+3
source share

All Articles