Skip to content

fix(iroh)!: reexport full dns module from iroh-relay#3916

Merged
Frando merged 8 commits intomainfrom
fix/dns-reexports
Mar 5, 2026
Merged

fix(iroh)!: reexport full dns module from iroh-relay#3916
Frando merged 8 commits intomainfrom
fix/dns-reexports

Conversation

@Frando
Copy link
Copy Markdown
Member

@Frando Frando commented Feb 6, 2026

Description

We currently only export some types from iroh_relay::dns as iroh::dns. This means if you actually want to customize the DNS resolver you have to add a dependency on iroh_relay to your crate, because several of the types needed are currently not exported from iroh.

This fixes it by reexporting the whole iroh_relay::dns module as iroh::dns.

Also fixes a few doccomments.

Breaking Changes

  • iroh::dns now is a reexport of iroh_relay::dns. Everything public already was reexported from iroh_relay::dns so this should not actually be breaking.

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.
    • List all breaking changes in the above "Breaking Changes" section.
    • Open an issue or PR on any number0 repos that are affected by this breaking change. Give guidance on how the updates should be handled or do the actual updates themselves. The major ones are:

@Frando Frando requested a review from dignifiedquire February 6, 2026 11:34
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 6, 2026

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3916/docs/iroh/

Last updated: 2026-03-05T08:42:01Z

@n0bot n0bot bot added this to iroh Feb 6, 2026
@github-project-automation github-project-automation bot moved this to 🚑 Needs Triage in iroh Feb 6, 2026
iroh/src/dns.rs Outdated
pub use iroh_relay::dns::{
DnsResolver, N0_DNS_ENDPOINT_ORIGIN_PROD, N0_DNS_ENDPOINT_ORIGIN_STAGING,
};
pub use iroh_relay::dns::*;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sceptical of glob exports, how much would it be to make these explicit?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can, it's just that we had this in the past and then forgot to update it when we added a new type in iroh_relay::dns that was used in a method of Resolver. So to prevent that I'd prefer a glob export. Or even just reexport the module?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could just reexport the module and move the tests somewhere else.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe cc @ramfox who thought about exports the most

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed a commit that fully reexports the dns module. I think this is much cleaner.

@Frando Frando requested review from ramfox February 9, 2026 15:00
@dignifiedquire dignifiedquire moved this from 🚑 Needs Triage to 👀 In review in iroh Feb 9, 2026
@Frando
Copy link
Copy Markdown
Member Author

Frando commented Feb 24, 2026

@ramfox wdyt, should we merge this? Currently I know two downstream projects that need to depend on iroh_relay for the missing reexports.

@Frando Frando changed the title fix: reexport full dns module from iroh-relay fix(iroh): reexport full dns module from iroh-relay Feb 24, 2026
@Frando Frando changed the title fix(iroh): reexport full dns module from iroh-relay fix(iroh)!: reexport full dns module from iroh-relay Feb 24, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 24, 2026

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: e344a5b

@Frando Frando requested a review from dignifiedquire March 5, 2026 08:39
@Frando Frando added this pull request to the merge queue Mar 5, 2026
Merged via the queue into main with commit 523c93c Mar 5, 2026
28 of 29 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in iroh Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants