を使用されることはありませんでの方法では地元のval、私は公共のファイルのルートとルートファイルを持っています。最近私は-Ywarn-unused
コンパイラフラグを追加しました。予期せぬ警告が表示されています。プレイフレームワークルートファイルのコンパイル警告:私のプレイのアプリで
ステップ:
GET /favicon.ico controllers.Assets.at(path="/public",file="/images/favicon.ico")
activator new testingScalac
routesファイルに追加- が
scalacOptions ++= Seq("-Ywarn-unused")
- で
build.sbt
フラグに追加する(テンプレート一覧からプレイスカラを選択してください)GET /favicon.png controllers.Assets.at(path="/public",file="/images/favicon.png")
GET /robots.txt controllers.Assets.at(path="/public",file="robots.txt")
さて、
sbt compile
リターンを実行している:$ sbt compile [info] Loading project definition from /Users/pedrorijo/git/testRepos/testingScalac/project [info] Set current project to testingScalac (in build file:/Users/pedrorijo/git/testRepos/testingScalac/) [info] Compiling 4 Scala sources and 1 Java source to /Users/pedrorijo/git/testRepos/testingScalac/target/scala-2.11/classes... [warn] /Users/pedrorijo/git/testRepos/testingScalac/conf/routes:15: local val in method at is never used [warn] GET /favicon.ico controllers.Assets.at(path="/public",file="/images/favicon.ico") [warn] /Users/pedrorijo/git/testRepos/testingScalac/conf/routes:16: local val in method at is never used [warn] GET /favicon.png controllers.Assets.at(path="/public",file="/images/favicon.png") [warn] /Users/pedrorijo/git/testRepos/testingScalac/conf/routes:17: local val in method at is never used [warn] GET /robots.txt controllers.Assets.at(path="/public",file="robots.txt") [warn] three warnings found [success] Total time: 10 s, completed Jul 5, 2016 3:11:28 PM
私はroutesファイルに間違った何かをして、またはそれはplayframework /コンパイラのバグであるAM(私はgithubのに見て、できませんでしたこれに関連するものは何でも見つかります)?
注:それは2.5.4を再生使用していますが、それはまた、遊びの2.4.xの問題を作成し
これは警告です。バグではありません – cchantep
おそらく、私がバグと呼んでいないとしても、単に「 – cchantep
」という警告を出しますが、私は致命的な警告を使用します。フラグ。警告なしにコンパイルが失敗します。 – pedrorijo91