-
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
clean up usage of string vs. protocol.ID #1886
Comments
can i pick this up? |
I'm looking into this. Discussed the issue with @marten-seemann |
Yes, that would be great!
I wouldn’t worry about that. Breaking the API is ok here, we can release this as a new major version. If you really, really want to avoid breaking API changes you could do this func NewGenericMultistreamMuxer[T ~string]() MultistreamMuxer[T] {
…
} and then have func NewMultistreamMuxer() MultistreamMuxer[string] {
return NewGenericMultistreamMuxer[string]()
} Not sure if that’s worth it here though, we don’t use it at so many places that avoiding the API change would actually pay off. |
For go-libp2p the changes are here. I have changed PeerStore. There are a couple of other places where we can remove the converstions before integrating the changes go-multistream repo. I'll update those changes soon. |
There is one source of conversion that remains, flow.MeterRegistry. However this only impacts bandwidth.go. @marten-seemann Should I change that to a generic implementation as well? |
I'm undecided on that one. I think for now it's ok to leave it as strings, since it's a fairly contained code path, and since we're not using the |
It's all over the place, and we're converting between the two all the time.
The text was updated successfully, but these errors were encountered: