mushroom
mushroom

Reputation: 6289

Run scala compiler with options from play console

I am trying to pass options to the scala compiler from within play.

I got: [warn] there were 1 feature warnings; re-run with -feature for details [warn] one warning found

So I tried using compile -feature but got:

$ compile -feature
[error] Expected end of input.
[error] compile -feature
[error]

What is the proper way to pass options to the compiler in the console?

Upvotes: 2

Views: 2538

Answers (2)

Robin Green
Robin Green

Reputation: 33063

$ set scalacOptions += "-feature"
$ compile

Upvotes: 3

Leesrus
Leesrus

Reputation: 1115

You can add scalac options in the project/Build.scala file.

Open this file and add your own project settings into the Play project object at the bottom of the file. For example:

val main = play.Project(appName, appVersion, appDependencies).settings(
    // Add your own project settings here   
    scalacOptions += "-feature" 
)

Upvotes: 4

Related Questions