Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running SBT with -deprecation

Tags:

scala

sbt

I seem to have warnings in my project/build.scala file (NOT IN MY SCALA PROJECT). How do I configure SBT to run with the -deprecation flag.

// Does not help so do not suggest it!
scalacOptions ++= Seq("-unchecked", "-deprecation")

I know that SBT has the sbt.boot.properties files, but can't figure out if the flag should go in there or not. And if it is an example would be nice. Thx in advance.

BTW

I use SBT launcher for 0.12.2 and have the issue both with SBT 0.12.2 and 0.11.3. And I'm on Ubuntu in case that matters.

like image 922
agilesteel Avatar asked Mar 18 '13 15:03

agilesteel


1 Answers

Simply put the scalacOptions setting in project/build.sbt. Settings for your project and your build definition go in different files, because they have to be compiled before they can be used and as you want to change compiler settings, this is not possible to handle in the same file.

edit: Just to prevent confusion, ./build.sbt, project/build.scala and project/build.sbt are different. In the first one you put your normal settings for the project and in the latter two (never both used together) you can put settings that affect the compilation of your project files.

like image 77
drexin Avatar answered Oct 14 '22 02:10

drexin