使用 -feature 重新运行以获取详细信息 [英] Re-run with -feature for details

查看:16
本文介绍了使用 -feature 重新运行以获取详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在游戏控制台中编译 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 并执行 reload 如果您的 sbt 控制台正在运行(或重新启动它).

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 重新运行以获取详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆