Skip to content
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

Registering new multicodecs #151

Closed
l0k18 opened this issue May 18, 2021 · 1 comment · Fixed by #152
Closed

Registering new multicodecs #151

l0k18 opened this issue May 18, 2021 · 1 comment · Fixed by #152

Comments

@l0k18
Copy link

l0k18 commented May 18, 2021

You can see here a wonderful, not-exported singleton registry variable that is in this delightful in-between where it's deprecated but functionality has not been maintained:

https://github.com/multiformats/go-multiaddr/blob/master/net/registry.go#L17

I get these deprecated markups in my IDE because the only way to add new codecs to this is marked deprecated, and it directs you to two functions that depend on you first being able to address the aforementioned singleton registry variable.

I only learned about this by looking at an old, not-updated uTP transport implementation. If it were my repository that singleton would be exported already, and the deprecation warnings would have some actual meaning. Or at least, to maintain some semblance of extensibility.

It's not that it's not extensible, it's just marked deprecated where you would extend it.

I figure first start the conversation, I am probably missing something as dealing with multiformats and libp2p involves a lotta lotta individual repositories which can be quite tedious to trace back and forth.

I am here mainly because I want to add a new protocol, namely https://github.com/xtaci/kcp and to do this it really needs to have kcp in there (yes I have already submitted a PR to add it to the CSV). This is day 3 of me tackling this project, I'm starting to make sense of it all but it's tricky.

I don't mind what way it gets resolved, for now I am just gonna smile at the strikethroughs in my syntax highlighting.

@Stebalien
Copy link
Member

This was simply an oversight, not some complex bug: #152.

Regardless, please lose the snark. First line of the CoC: "Be respectful"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants