-
Notifications
You must be signed in to change notification settings - Fork 325
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
Core isolation - part 4 #258
Conversation
tide-router/src/router.rs
Outdated
pub(crate) endpoint: &'a DynEndpoint<State>, | ||
pub(crate) params: Params, | ||
#[allow(missing_debug_implementations)] | ||
pub struct Selection<'a, State> { |
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.
We might need to merge Context
-building logic of tide::App
into Router::route
in order to remove this.
Wanted to do a little bit more with the routing extraction, but was quite busy this week, so decided to wrap this PR and get it into a merge-able state (if everyone's fine with the changes)! Hope it looks okay! |
tide-core/Cargo.toml
Outdated
[features] | ||
default = ["hyper"] | ||
hyper = ["http-service-hyper"] | ||
serde_derive = "1.0.91" |
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.
Minor tidbit, but should have a newline at EOF
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.
ha, will do when doing the rebase! 👍
Stabilizing CoreI thought when we were talking about trying to stabilize the core parts first, we would take away as many parts as possible. I ran the docs command, and there seem to be quite a few things left that I'm not sure should be included by default: So my question is: what's the plan around only stabilizing the core parts of tide? I feel we talked about it in #162 (comment), but feel we might still not be aligned. RouterI'm unsure about the benefits of moving out the router into its own crate. For example when looking at the docs This could be easily fixed, but it feels like everything is quite tightly integrated, which makes me wonder about why we're moving this into their own crate in the first place. We probably wouldn't want to individually version / publish the router, and no crates other than Tide would likely want to depend on it. Also as mentioned in this patch moving the routing into Perhaps it might be better to not move the router into its own crate until we're sure about the value it would deliver + we know where to draw the module boundaries. |
I agree that it's tough to extract router into another crate. Current design of the router is tightly integrated into Tide core; we need a different design if we're going to split this out of core. |
Just a status update, but #271 will need to be resolved before this is merged |
Sorry, been a bit busy last week, couldn't wrap this up. @yoshuawuyts - Following up with our discussion, the extras showing up like @fairingrey - While I'm in favor of a more flexible routing design, in the context of this PR, I think I align with @yoshuawuyts to move it back - Personally, I'd be surprised if the routing RFC comes to a speedy conclusion (Disclaimer: I haven't really had a chance to read it in detail yet), or a better question is if it even should be rushed into one - as if there's is a strong consensus to moved, I think it'd be good to take the time to come up with a solid impl plan in the RFC. What do you think? |
@prasannavl I'm in favor of making the smallest amount of changes needed to move forward, but including the reversals you mentioned. I think we would benefit from doing another release sooner rather than later so folks get a chance to actually test out the changes (: |
That's a good point, I agree -- I'd say once we move the routing back in this PR (as it may take a while for the routing RFC to resolve) then we can just merge this and get people on this version of Tide. Looking forward to it! |
|
||
[dependencies] | ||
futures-preview = "0.3.0-alpha.16" | ||
http = "0.1" | ||
http-service = "0.2.0" | ||
http-service-hyper = { version = "0.2.0", optional = true } |
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.
[imo] I wanted an empty line below.
Description
Server
,App
to tide; maketide-core
more minimal;tide-core
no longer takes a few additional dependencies likehttp-service-hyper
and features flags are now directly on tide.tide-core::internal
Next
,Selection
andCause
.router
module intide
EndpointResult
fromerror
module intoendpoint
module, as that seems more natural.Body
from http-service as it's commonly needed outside - and we already re-exportResponse
. This lets users not to take an explicit dependency just forhttp-service::Body
.Others
err_fmt
macroMotivation and Context
#162 #252 #255
How Has This Been Tested?
All tests passed
Types of changes
Checklist: