-
Notifications
You must be signed in to change notification settings - Fork 161
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(iroh-net): Own the public QUIC API #2279
Conversation
This export a lot of quinn types directly from iroh-net::magic_endpoint. These are all the types we need to interact with iroh-net in our own code. The goal is that users should not need to figure out how to add their own (iroh-)quinn dependency to use iroh-net, instead all types should be provided by iroh-net. Not all APIs are re-exported however, to avoid exporting too much. Hopefully what iroh itself needs is a reasonable indication of what is needed, we can always add more.
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.
really important change to get in soon. Any reason to handle the typing and docs in the qualified way vs doing imports?
iroh-gossip/src/net.rs
Outdated
/// [`Connection`]: iroh_net::magic_endpoint::Connection | ||
pub async fn handle_connection( | ||
&self, | ||
conn: iroh_net::magic_endpoint::Connection, |
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.
we already do a bunch of iroh_net
imports in these files. Why not do the same and keep the docs and params simply referring the import? The new state is a tad too verbose for my liking. What do you think?
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.
I went with a direct replacement as I was not editing the local code: if quinn::SomeThing
was used I replaced it without imports as well. It is true the new full name is a lot longer. It will probably also change to iroh_net::endpoint
sometime soon as well which is at least a bit shorter.
I will attempt some cleanup.
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.
290e447 is more aggressive with imports, hope this is better
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.
LGTM.
Related, do we not export these types in the public api's of the individual crates? should we? not sure on either
Description
This export a lot of quinn types directly from
iroh-net::magic_endpoint. These are all the types we need to interact
with iroh-net in our own code. The goal is that users should not need
to figure out how to add their own (iroh-)quinn dependency to use
iroh-net, instead all types should be provided by iroh-net.
Not all APIs are re-exported however, to avoid exporting too much.
Hopefully what iroh itself needs is a reasonable indication of what is
needed, we can always add more.
Breaking Changes
Notes & open questions
Change checklist