Bob*_*har 4 sbt scala-ide playframework-2.1
我是 Scala、Scala-IDE 和 Play 2.1 的新手,正在学习这些教程。今天,我注意到“todolist”教程发出的 Eclipse 项目在 Scala-IDE 中显示了一条警告,我不明白该警告,希望将其消失。
这个答案如何获取有关“功能”标志警告的更多信息?建议我只需要添加...
scalacOptions ++= Seq(... "-feature")
Run Code Online (Sandbox Code Playgroud)
...到我的 sbt 构建定义文件,我认为该文件是 Play 2.1 项目的project/Build.scala。试图把它放在那里,但是......
import sbt._
import Keys._
import play.Project._
object ApplicationBuild extends Build {
val appName = "todolist"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
// Add your project dependencies here,
jdbc,
anorm
)
val main = play.Project(appName, appVersion, appDependencies).settings(
// Add your own project settings here
scalacOptions ++= Seq(... "-feature")
)
}
Run Code Online (Sandbox Code Playgroud)
...,导致编译错误...
[info] Loading project definition from /Users/bobk/work/todolist/project
[error] /Users/bobk/work/todolist/project/Build.scala:18: illegal start of simple expression
[error] scalacOptions ++= Seq(... "-feature")
[error] ^
[error] /Users/bobk/work/todolist/project/Build.scala:21: ')' expected but '}' found.
[error] }
[error] ^
[error] two errors found
[error] (compile:compile) Compilation failed
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
Run Code Online (Sandbox Code Playgroud)
如果我想在 Play 2.1 的 sbt 构建定义中设置 scalacOptions,我应该在哪里指定它以及如何指定?