KajMagnus KajMagnus - 11 months ago 156
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.