本文介绍了使用-feature重新运行以获取详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在Play控制台中编译scala时,我得到了:
When I compile scala in play console, I got this:
[warn] there were 1 feature warning(s); re-run with -feature for details
[warn] one warning found
我以为是compile -feature
的意思,但是我明白了:
I thought it means compile -feature
, but I got this:
[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
,我得到了:
Then I run play -feature
, I got this:
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0
然后退出游戏.
那我应该怎么做?
推荐答案
您必须添加
scalacOptions += "-feature"
到build.sbt
,如果sbt控制台正在运行(或重新启动),则执行reload
.
to your build.sbt
and execute reload
if your sbt console is running (or restart it).
或者,如果您只想在sbt控制台中为单个会话设置它.
Alternatively if you want to set it only for a single session, while in sbt console.
set scalacOptions += "-feature"
您可以编写,此设置将立即应用,无需重新加载或重新启动sbt控制台.
You can write, this setting is applied immediately, no need to reload or restart sbt console.
这篇关于使用-feature重新运行以获取详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!