-
Notifications
You must be signed in to change notification settings - Fork 277
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
Remove Core::Context in favor of smarter Core::Request #589
Comments
@mickeyn and I are hacking on it. |
We've done a ton of work on this, available in a branch. We were basically able to remove from the codebase the biggest part of the All tests pass so far. |
so, https://github.com/PerlDancer/Dancer2/tree/feature/untangle-context is fully functional and context-less. |
I am willing to offer I'd prefer not to push it without another person (or more) reviewing this. |
I'll review it. It may take a week, but I will get there (there's a lot to get through)! /me starts thinking about what |
@veryrusty don't be shy, he actually meant $anything :) |
Ok - got through that branch! @mickeyn++ for the AWESOME commit messages!! I've made comments inline and/or on individual commits as necessary. There are two things that need addressing before attempting a merge (I'm probably repeating myself):
We may also wish to log a warning (deprecate) the There has also been a |
I just want to note I coerced @mickeyn to write longer commit messages, other than "fixed shit". :) |
Looking at @mickeyn's "merged" branch (
|
@veryrusty - spot on! fixed. |
Last fail is simply the Mutable Serializer trying to resolve the content type using the request information from the context. Because it has no context, it can't do that. It makes sense for a serializer to have access to the content type (or resolved content type, which is derived from multiple headers), maybe even the request. I'm still not sure how to do this, since the serialization and deserialization methods are called from the response, which doesn't have the request either. |
Merged. Releasing now as development version. We need to get working on cleaning up the plugins. |
One thing that bugs me is
Core::Context
. It is created in the app from the request, contains a reference back to the app, and the app contains a reference to itself. It holds both data and actions, but neither on itself.Until now I wasn't even sure what the hell it is exactly meant for. Now I understand it better, and it seems like we could actually remove it (and some duplicate code that exists there) in favor of making the
Core::Request
object more aware of able.I'd like to get some opinions on this.
The text was updated successfully, but these errors were encountered: