-
Notifications
You must be signed in to change notification settings - Fork 964
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
feat(swarm): deprecate NegotiatedSubstream
in favor of Stream
#3912
Conversation
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.
One small nit pick. Otherwise looks good to me. Good to get rid of Substream*
!
swarm/src/connection.rs
Outdated
@@ -470,24 +472,23 @@ impl<'a> IncomingInfo<'a> { | |||
} | |||
} | |||
|
|||
struct SubstreamUpgrade<UserData, Upgrade> { | |||
struct SubstreamUpgrade<UserData, TOk, TErr> { |
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.
struct SubstreamUpgrade<UserData, TOk, TErr> { | |
struct StreamUpgrade<UserData, TOk, TErr> { |
Given that this is an internal type, why not already rename it here?
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.
It didn't even occur to me, yes makes a lot of sense :)
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.
There are a fair few more usages of "substream" but I think those can easily go in separate PRs.
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.
There are a fair few more usages of "substream" but I think those can easily go in separate PRs.
👍 works for me.
Co-authored-by: Max Inden <mail@max-inden.de>
…2p into feat/swarm/decouple-mss
What about |
We should get rid of all the "sub"-stream terminology yes. I've not had time to follow up on this PR. Most of the symbols are in individual crates so it is not urgent. Perhaps the only one we should rename as part of this breaking release is |
Description
This patch tackles two things at once that are fairly intertwined:
NegotiatedSubstream
.NegotiatedSubstream
was a type alias that pointed to a type frommultistream-select
, effectively leaking the version ofmultistream-select
to all dependencies oflibp2p-swarm
. We fix this by introducing aStream
newtype.Resolves: #3759.
Related: #3748.
Notes & open questions
Despite being an invasive and technically breaking change, I think the upgrade should be pretty painless.
Change checklist