refactor(iroh): toggle unstable item visibility with the visibility crate#4339
Open
Frando wants to merge 1 commit into
Open
refactor(iroh): toggle unstable item visibility with the visibility crate#4339Frando wants to merge 1 commit into
Frando wants to merge 1 commit into
Conversation
…rate Replace the `cfg_attr(not(feature = ...), allow(unreachable_pub))` suppressions on the `unstable-net-report` and `unstable-custom-transports` items with `cfg_attr(feature = ..., visibility::make(pub))` on a `pub(crate)` base. The items (and the public methods of those types) are now genuinely `pub(crate)` when the feature is off and `pub` when it is on, so no lint suppression is needed. `Endpoint::last_net_report` and the internal net report getter are gated behind `unstable-net-report` to match, since they expose `Report`.
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/4339/docs/iroh/ Last updated: 2026-06-12T11:22:53Z |
Member
Author
|
I'm not 100% sold that this is an improvement. It somehow makes it harder to see for me which APIs are public, even if behind a feature flag. |
dignifiedquire
approved these changes
Jun 15, 2026
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
Based on #4338
Replace the
cfg_attr(not(feature = ...), allow(unreachable_pub))suppressions on theunstable-net-reportandunstable-custom-transportsitems withcfg_attr(feature = ..., visibility::make(pub))on apub(crate)base. The items (and the public methods of those types) are now genuinelypub(crate)when the feature is off andpubwhen it is on, so no lint suppression is needed.Change checklist