refactor(iroh)!: Improve feature-gating for unstable-custom-transports#4228
Open
refactor(iroh)!: Improve feature-gating for unstable-custom-transports#4228
unstable-custom-transports#4228Conversation
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/4228/docs/iroh/ Last updated: 2026-05-05T14:03:19Z |
rklaehn
reviewed
May 5, 2026
| kind: transports::AddrKind, | ||
| bias: transports::TransportBias, | ||
| ) -> Self { | ||
| pub fn transport_bias(mut self, kind: AddrKind, bias: TransportBias) -> Self { |
Contributor
There was a problem hiding this comment.
I know that this is a breaking change, but can we make this private unless the unstable-custom-transports feature is set? As far as I know that is the only place where it is used right now.
Basically if we ever wanted to have an even more flexible way to select paths, this opinionated way to select transports woudl get in the way.
Member
Author
There was a problem hiding this comment.
pushed a commit that does this
rklaehn
reviewed
May 5, 2026
|
|
||
| /// Types for defining custom transports | ||
| #[cfg(feature = "unstable-custom-transports")] | ||
| pub mod transports { |
Contributor
There was a problem hiding this comment.
So the entire transports module becomes gated, and we import the internal stuff directly? Nice!
This file contains hidden or 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
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
Moves
AddrKindandTransportBiaswhich are part of the non-feature-gated API up toiroh::endpoint, and gate the wholeiroh::endpoint::transportsmodule behind theunstable-custom-transportsBreaking Changes
iroh::Endpoint::transport_biasis now gated on theunstable-custom-transportsfeatureiroh::endpoint::transportsand its remaining items (Addr,Transmit,RecvInfo,CustomTransport,CustomEndpoint,CustomSender) are now only exported when theunstable-custom-transportsfeature is enabled.Change checklist