-
Notifications
You must be signed in to change notification settings - Fork 1k
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
refactor(core): blanket implementation of connection upgrade #4316
refactor(core): blanket implementation of connection upgrade #4316
Conversation
Just approved CI to run. |
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.
Good work. Thank you.
Next steps for this pull request would be:
- Deprecate the existing
{Out,In}boundUpgrade
trait definitions. - Bump
libp2p-core
patch version. - Opposite to what @thomaseizinger suggests in core: introduce
{In,Out}boundConnectionUpgrade
traits #4307 I think we can already update thetransports/
andmuxers/
protocols to the new{Out,In}boundConnectionUpgrade
s. Given the blanket implementation, this is a backwards compatible change. Am I missing something @thomaseizinger?
It is not. Removing a trait implementation for a public struct is a breaking change. Imagine someone having a function: fn bar(foo: impl InboundUpgrade); Currently, calling this function with |
Should we already do that in here? I will require us spread a lot of In order to not block this PR on it, I'd suggest we don't deprecate this in here. |
Let me know what is required. I would be open to continue this work in a separate pr (with some guidance ofc) |
Oh, yes, quite obviously. You are right. Thank you. |
👍 makes sense. Thank you for expanding @thomaseizinger. |
Thank you @PanGan21. Let's get this pull request merged first. There are still multiple |
By doing this and replacing the usage of the previous traits with the new ones I am getting error for conflicting implementations. Am I missing something important?
|
I am not sure that is correct. Most implementations of I think the way we have to handle this for now is to tag all those with |
Sounds good to me. @PanGan21 sorry for the confusion.
I don't think the first iteration of #4120 can cover all cases and thus I don't think we can remove the |
Maybe not in the first iteration but hopefully at some point :) If we keep it, we could at least move it to some kind of util package that isn't part of the public API of |
Hi guys. I am just wondering, is there something I can do more to have this pr done? Or it is targeting a later release so I have to wait? |
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.
Sorry that this has been dragging on for so long! Normally we don't have such a long turn-around time for PRs but this one somehow slipped through!
It looks good to me! I'll write up a follow-up issue on what needs to be done next! :)
Description
Introduces blanket implementation of
{In,Out}boundConnectionUpgrade
and uses it in transport upgrade infrastructure.Resolves: #4307.
Notes & open questions
Change checklist