LoginSignup
1
1

More than 5 years have passed since last update.

sbtのwarningの中身を読む

Last updated at Posted at 2017-11-09

課題

sbtがコンパイルの度

[warn] there was one deprecation warning; re-run with -deprecation for details
[warn] there was one feature warning; re-run with -feature for detail

というようにwarningがあるということを教えてくれるが、そのままだと読むことが出来ない。

解決策

sbtコンソールからコンパイルしたいproject(下例ではhoge-project)に移動し、scalacOptionsを設定した上でコンパイルしてやれば大丈夫です。

$ sbt

> project hoge-project
> set scalacOptions in ThisBuild ++= Seq("-deprecation", "-feature")
> compile

ワンライナーでも書けて、上と同じものは

$ sbt 'project hoge-project' 'set scalacOptions in ThisBuild ++= Seq("-deprecation", "-feature")' compile

となります。

scalacOptionsの中身は re-run with ... で要求されているものを適宜与えてやればよいかと思います。

参考: https://stackoverflow.com/questions/9578521/scala-sbt-how-to-re-run-with-deprecation

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1