fix(iroh)!: reexport full dns module from iroh-relay#3916
Conversation
|
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 |
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::*; |
There was a problem hiding this comment.
I am sceptical of glob exports, how much would it be to make these explicit?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
We could just reexport the module and move the tests somewhere else.
There was a problem hiding this comment.
maybe cc @ramfox who thought about exports the most
There was a problem hiding this comment.
I pushed a commit that fully reexports the dns module. I think this is much cleaner.
|
@ramfox wdyt, should we merge this? Currently I know two downstream projects that need to depend on iroh_relay for the missing reexports. |
Description
We currently only export some types from
iroh_relay::dnsasiroh::dns. This means if you actually want to customize the DNS resolver you have to add a dependency oniroh_relayto your crate, because several of the types needed are currently not exported fromiroh.This fixes it by reexporting the whole
iroh_relay::dnsmodule asiroh::dns.Also fixes a few doccomments.
Breaking Changes
iroh::dnsnow is a reexport ofiroh_relay::dns. Everything public already was reexported fromiroh_relay::dnsso this should not actually be breaking.Notes & open questions
Change checklist
quic-rpciroh-gossipiroh-blobsdumbpipesendme