-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Remove StaticAssetsMetadata
#13094
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
base: main
Are you sure you want to change the base?
Remove StaticAssetsMetadata
#13094
Conversation
val path = base + "/" + value.name | ||
StaticAssetsMetadata.finder.findAssetPath(base, path) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This removal could cause problems I guess...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are absolutely right. This is binder for Assets for generated routes are like
GET /public/*file controllers.Assets.versioned(path = "/public", file: controllers.Assets.Asset)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the description of the pull request. I could make the PR green by switching everything to assetsfinder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we will merge this, we also should remove the method controllers.Assets.versioned(String, Asset)
and for that we will should mark it as @Deprecated
in 2.9.x
and 3.0.x
3ba91a6
to
24d539c
Compare
24d539c
to
7de4f1b
Compare
7de4f1b
to
138a51f
Compare
138a51f
to
da7ebb8
Compare
Currently, we have two approaches for reverse routing public assets, both are described here:
This pull requests removes the first one by removing
StaticAssetsMetadata
. Reason for removal is to remove all static/"global" state.However I am not sure if we really should merge this pull request.
Reason is, the first approach is a bit easier for people how do not care about a static state in their applications, like when you are working on a single Play instance and not plan to run multiple Play apps within one jvm.
I think if we just keep both approaches documented it should be ok.
Not sure yet.