I get an error there were 15 feature warning(s); re-run with -feature for details
:
$ /usr/local/sbt/bin/sbt
[info] Loading project definition from /home/alex/Documents/projects/my_app123/project
[info] Set current project to sbt-android (in build file:/home/alex/Documents/projects/my_app123/)
> compile -feature
[error] Expected end of input.
[error] compile -feature
[error] ^
> sbt-version
[info] 0.12.4
> compile
[warn] Credentials file /home/alex/.ivy2/.credentials does not exist
[info] Compiling 20 Scala sources to /home/alex/Documents/projects/my_app123/target/scala-2.10/sbt-0.12/classes...
[error] there were 15 feature warning(s); re-run with -feature for details
[error] one error found
[error] (compile:compile) Compilation failed
[error] Total time: 27 s, completed 01 12, 15 1:20:12 PM
In build.sbt
scalaVersion := "2.10.4"
I can't find out what that error is because it doesn't say that, even when I run sbt as $ /usr/local/sbt/bin/sbt -feature
.
$ /usr/local/sbt/bin/sbt -feature
[info] Loading project definition from /home/alex/Documents/projects/my_app123/project
[info] Set current project to sbt-android (in build file:/home/alex/Documents/projects/my_app123/)
$
It's JDK 1.7
What's the error is and how do I fix it?
UPDATE:
build.sbt
scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation")
or in sbt itself:
> set scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation")
The error remains the same.
I don't get a chance to use sbt on a daily basis, so this is just to confirm the suggestion in the linked answer:
Hey, it worked!
You should add
to your build.sbt and execute reload if your sbt console is running (or restart it).
Alternatively if you want to set it only for a single session, while in sbt console, you can write
set scalacOptions += "-feature"
, this setting is applied immediately, no need to reload or restart sbt console.Re-run with -feature for details