Sat*_*ato 27 scala playframework
当我在Play控制台中编译scala时,我得到了这个:
[warn] there were 1 feature warning(s); re-run with -feature for details
[warn] one warning found
Run Code Online (Sandbox Code Playgroud)
我认为这意味着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]
Run Code Online (Sandbox Code Playgroud)
然后我跑play -feature,我得到了这个:
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0
Run Code Online (Sandbox Code Playgroud)
并且放弃了.
那我该怎么做呢?
lpi*_*ora 40
你必须添加
scalacOptions += "-feature"
Run Code Online (Sandbox Code Playgroud)
如果您的sbt控制台正在运行(或重新启动),请build.sbt执行并执行reload.
或者,如果您只想为单个会话设置它,而在sbt控制台中,您可以编写build.sbt,此设置立即应用,无需重新加载或重新启动sbt控制台.