-
Notifications
You must be signed in to change notification settings - Fork 24
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
Change the type of reset error #6
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.
Historically, yamux was a separate non-libp2p library that we forked. That's why the error is yamux specific. We didn't really want to make it depend on libp2p.
@whyrusleeping is there any more historical context here? If we make this library depend on go-libp2p, we might as well merge it into go-libp2p-yamux (the smux library wrapper).
Hrm... I don't like this approach. This ends up meaning that to be conformant, your base level stream multiplexer needs to depend on libp2p, which isn't okay. Alternatively, we could define a go error trait, |
Note: the other solution is to wrap the stream type in go-libp2p-yamux. |
Thoughts on this:
|
@raulk this brings up interface questions. |
@whyrusleeping, agree with you about libp2p dependency, but then the issue is also applicable to |
It does, and that's my bad. I merged that PR without thinking about the dependency inversion (and we should probably revert it and do the same thing). |
I think |
@Stebalien why you migrated the repo to libp2p organization? Why not just simply depend on hashicorp's one? |
We needed to make some pretty invasive changes. Originally, we maintained a fork and mostly upstreamed patches but the implementations have diverged. We should try upstreaming changes but that'll be a significant task at this point. |
d16c7b4
to
7517316
Compare
Closing in favor of libp2p/go-libp2p-yamux#10 |
I've come to the moment where I had to check if the stream is reset while using
go-yamux
, but checking using thego-yamux
internal error is not the case where there is a globally defined one.