[2.3.9 Scala] Compiling with unused imports

244 views
Skip to first unread message

Nelson Loyola

unread,
Jun 24, 2015, 11:13:16 AM6/24/15
to play-fr...@googlegroups.com

I’m compiling my project with warnings for unused imports (I set -Ywarn-unused-import in scalacOptions in build.sbt). When I compile the project I get warnings about unused imports in my routes file and my only template file.

I can reproduce the problem with the play-angular-require-seed project. Here are the warnings:

[warn] /home/nelson/src/github/scala/play-angular-require-seed/conf/routes:23: Unused import
[warn] GET     /authuser               controllers.Users.authUser()
[warn] /home/nelson/src/github/scala/play-angular-require-seed/conf/routes:20: Unused import
[warn] POST    /users                  controllers.Users.createUser()
[warn] /home/nelson/src/github/scala/play-angular-require-seed/conf/routes:16: Unused import
[warn] POST    /logout                 controllers.Application.logout()
[warn] /home/nelson/src/github/scala/play-angular-require-seed/conf/routes:6: Unused import
[warn] GET     /                       controllers.Application.index
[warn] /home/nelson/src/github/scala/play-angular-require-seed/conf/routes:9: Unused import
[warn] GET     /jsroutes.js            controllers.Application.jsRoutes()
[warn] /home/nelson/src/github/scala/play-angular-require-seed/conf/routes:15: Unused import
[warn] POST    /login                  controllers.Application.login()
[warn] /home/nelson/src/github/scala/play-angular-require-seed/conf/routes: Unused import
[warn] /home/nelson/src/github/scala/play-angular-require-seed/app/views/index.scala.html:1: Unused import
[warn] @()<!DOCTYPE html>
[warn] ^

The warning messages are misleading and I cannot figure out what the source of the problem is. Can anyone help me figure this out?

The project can be cloned from my GitHub account at https://github.com/nloyola/play-angular-require-seed.

Thanks

Karim Heraud

unread,
Aug 30, 2016, 4:45:38 AM8/30/16
to play-framework
Same problem here with 2.4.x
Reply all
Reply to author
Forward
0 new messages