Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.3.9] splitted routes are not recompiled #4430

Closed
fdietze opened this issue May 11, 2015 · 3 comments
Closed

[2.3.9] splitted routes are not recompiled #4430

fdietze opened this issue May 11, 2015 · 3 comments

Comments

@fdietze
Copy link

fdietze commented May 11, 2015

When I split my routes file like this:

...
GET /assets/*file controllers.Assets.at(path="/public", file)

-> /api/v1 api.Routes
...

and only change something in api.Routes, a recompilation throws me the following errors:

...
[error] /home/felix/projects/wust/app/views/includes.scala.html:26: value Assets is not a member of object controllers.routes
[error] <script src='@routes.Assets.at("main.js")'></script>
[error]                      ^
...

after a clean. Everything compiles correctly.

So I guess this is a bug?

@jroper
Copy link
Member

jroper commented May 12, 2015

Does api.routes contain any routes to any controllers in the controllers package? If so, then that's the reason, the reverse router from api.routes for the controllers package is overwriting the reverse router from routes for the controllers package, different routes files must address controllers in different packages.

@jroper jroper closed this as completed May 12, 2015
@cornerman
Copy link

Cool, good to know. Thanks!

@oripwk
Copy link

oripwk commented Nov 16, 2017

This causes unexpected behavior during builds. Every build, different Reverse Route appears in the package, and integration tests using reverse routes fail randomly. If it would fail during compile time instead of silently overriding it would be much better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants