Remove StaticRoutesGenerator by gmethvin · Pull Request #8049 · playframework/playframework · GitHub
Skip to content

Remove StaticRoutesGenerator#8049

Merged
gmethvin merged 1 commit intoplayframework:masterfrom
gmethvin:remove-static-routes
Dec 11, 2017
Merged

Remove StaticRoutesGenerator#8049
gmethvin merged 1 commit intoplayframework:masterfrom
gmethvin:remove-static-routes

Conversation

@gmethvin
Copy link
Copy Markdown
Member

Removes the static routes generator, references the removal in the the migration guide, and removes references to the static routes generator in the documentation.

Fixes #8047.

@gmethvin gmethvin force-pushed the remove-static-routes branch from 3348ec7 to c8803e9 Compare December 3, 2017 22:18
Copy link
Copy Markdown
Member

@richdougherty richdougherty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggested removing the sbt setting used to choose a different generator, since now there's only one kind. Not sure if that was something you were planning for a future PR or not.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get rid of the routesGenerator setting entirely now that there's only one type of generator?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering that too, but thinking it doesn't hurt to leave it there just in case someone wants to configure a custom routes generator.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds fair enough. I guess I'm always a fan of reducing API surface if we can. :)

Copy link
Copy Markdown
Contributor

@schmitch schmitch Dec 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well I think we should let it there. since sird is better and better, people can actually create a NoOpRoutesGenerator, which can be used with sird. This will save a lot of unnecessary IO while looking for route files. (and there are various other way's why people would create their own..)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schmitch wouldn't it be better to have Play provide a NoOpRoutesGenerator for people in that case?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well I'm not sure how many people would actually need it and it's not really that hard to implement.

Copy link
Copy Markdown
Member Author

@gmethvin gmethvin Dec 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or they could just remove the RoutesCompiler plugin. We have a PlayService plugin in 2.7 that is more minimal and does not include the routes compiler.

I have no problem with leaving the option in, though. The main point of this PR is to avoid having to maintain the static routes compiler. I could also see value in allowing someone to provide a routes generator that uses a completely different mechanism to generate a router or customizes the default generator in some way. It's possible people are already doing that.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK with leaving the option in. FYI I just changed my review to 👍 since I'm not requesting changes anymore.

@gmethvin
Copy link
Copy Markdown
Member Author

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

Successfully merging this pull request may close these issues.

4 participants