当我在游戏机中编译scala时,得到了以下信息:
[warn] there were 1 feature warning(s); re-run with -feature for details
[warn] one warning found
我以为是这个意思compile -feature
,但是我明白了:
[error] Expected ID character
[error] Not a valid command: compile (similar: completions)
[error] Expected project ID
[error] Expected configuration
[error] Expected ':' (if selecting a configuration)
[error] Expected key
[error] Expected '::'
[error] Expected end of input.
[error] compile -feature
[error]
然后我运行play -feature
,我得到了:
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0
并退出游戏。
那我该怎么做呢?
您必须添加
scalacOptions += "-feature"
您build.sbt
和执行reload
,如果你的SBT控制台正在运行(或重启)。
或者,如果您只想在sbt控制台中为单个会话设置它。
set scalacOptions += "-feature"
您可以编写,此设置将立即应用,无需重新加载或重新启动sbt控制台。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句