KajMagnus KajMagnus - 1 year ago 285
Scala Question

Scala SBT: How to "re-run with -deprecation"

When I compile Scala code, by running

sbt compile
, SBT says:

$ sbt compile
[warn] there were 5 deprecation warnings; re-run with -deprecation for details

How do I do that? (From within SBT?)

Answer Source

If you don't want to change your build.sbt:

$ sbt
> set scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation")
> compile
> exit

Edit: Added "-unchecked" and in ThisBuild per comments.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download