9

Seeing this in my console after running play -> run:

[warn] there were 1 feature warning(s); re-run with -feature for details
[warn] one warning found

Where is this enabled? Would like to see what the warning is, but running play -feature or run -feature doesn't seem to do the trick.

I'm running Play Framework 2.2.0-scala

tshepang
  • 12,111
  • 21
  • 91
  • 136
randombits
  • 47,058
  • 76
  • 251
  • 433

1 Answers1

12

-feature is a compiler option - it must be passed to scalac.

To pass arguments to scalac in play or in any sbt build for that mattern you use the scalacOptions setting.

So add this in your build.sbt:

scalacOptions += "-feature"
Marius Danila
  • 10,311
  • 2
  • 34
  • 37
  • 4
    Similarly, if it's project/Build.scala building your stuff, add 'object AppBuild extends Build { ... lazy val scalacOptions = Seq ( ... "-feature" ) .. } Some projects use project/Build.scala instead of build.sbt. (This is as a general helpful advice, Play probably uses build.sbt.) – akauppi Jan 02 '14 at 23:39
  • or.. (to replace my earlier comment), if it's a `project/*.scala` file, make a `project/turtle.sbt` file that has the `scalacOptions` setting. – akauppi Sep 23 '16 at 10:12