-
Notifications
You must be signed in to change notification settings - Fork 210
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(iroh-net)!: Rename Endpoint::local_endpoints to direct_addresses #2369
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also for EndpointType -> DirectAddressType
This changes the public api because for some reason config was public.
This is more in line with other Addrs, e.g. SocketAddr.
2 tasks
divagant-martian
approved these changes
Jun 18, 2024
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 find this really easier to understand overall. I left some comments about moved docs that could be improved because they look like go docs and are, in fact, inaccurate or even wrong.
If you consider doing those changes out of scope it's fine by me
dignifiedquire
approved these changes
Jun 18, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jun 18, 2024
## Description This audits the public visibility of items in the magicsock module. pub(super) and pub(crate) mean the same thing here, since it is a top-level module. This prefers pub(crate) to make it clear who can see the items. Likewise it marks sub-items pub(crate) as well to make the visibility clear. ## Breaking Changes ## Notes & open questions This is targetted at #2369 which will need to be merged first. ## Change checklist - [x] Self-review. - ~~[ ] Documentation updates if relevant.~~ - ~~[ ] Tests if relevant.~~ - [x] All breaking changes documented.
ppodolsky
pushed a commit
to izihawa/iroh
that referenced
this pull request
Jun 22, 2024
…sses (n0-computer#2369) ## Description This renames Endpoint::local_endpoints to Endpoint::direct_addresses. As a consequence it renames a lot of other things, e.g. config::Endpoint type becomes magicsock::DirectAddr. This is hopefully the last ambiguous use of "endpoint". The name "direct addresses" seemed to be the consensus on a discord bikeshedding thread. The entire config module is removed and the types are moved into magicsock instead. These types did not have anything to do with configuration and this was also a source of confusion. Because the visibility of these types changed some dead code was removed as well. ## Breaking Changes - iroh_net::Endpoint::local_endpoints -> iroh_net::Endpoint::direct_addresses - iroh_net::endpoint::LocalEndpointStream -> iroh_net::endpoint::DirectAddrStream - iroh_gossip::net::Gossip::update_endpoints -> iroh_gossip::net::Gossip::update_direct_addresses - iroh_net::config is removed. - iroh_net::config::Endpoint -> iroh_net::magicsock::DirectAddr - iroh_net::config::EndpointType -> iroh_net::magicsock::DirectAddrType - iroh_net::config::NetInfo -> removed - iroh_net::config::LinkInfo -> removed ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review. - [x] Documentation updates if relevant. - ~~[ ] Tests if relevant.~~ - [x] All breaking changes documented.
ppodolsky
pushed a commit
to izihawa/iroh
that referenced
this pull request
Jun 22, 2024
…2371) ## Description This audits the public visibility of items in the magicsock module. pub(super) and pub(crate) mean the same thing here, since it is a top-level module. This prefers pub(crate) to make it clear who can see the items. Likewise it marks sub-items pub(crate) as well to make the visibility clear. ## Breaking Changes ## Notes & open questions This is targetted at n0-computer#2369 which will need to be merged first. ## Change checklist - [x] Self-review. - ~~[ ] Documentation updates if relevant.~~ - ~~[ ] Tests if relevant.~~ - [x] All breaking changes documented.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This renames Endpoint::local_endpoints to Endpoint::direct_addresses. As a consequence it renames a lot of other things, e.g. config::Endpoint type becomes magicsock::DirectAddr. This is hopefully the last ambiguous use of "endpoint". The name "direct addresses" seemed to be the consensus on a discord bikeshedding thread.
The entire config module is removed and the types are moved into magicsock instead. These types did not have anything to do with configuration and this was also a source of confusion. Because the visibility of these types changed some dead code was removed as well.
Breaking Changes
Notes & open questions
Change checklist
[ ] Tests if relevant.