Skip to content

Change infallible custom DNS constructors in a future release #6420

@diegomrsantos

Description

@diegomrsantos

This follow-up comes from PR #6418. Hickory 0.26 changed resolver construction so ResolverBuilder::build() returns Result<Resolver<_>, NetError>.

PR #6418 now exposes the fallible path with libp2p_dns::tokio::Transport::try_custom and libp2p::SwarmBuilder::try_with_dns_config. The existing Transport::custom and SwarmBuilder::with_dns_config methods remain infallible compatibility wrappers, so they still panic if Hickory resolver construction fails.

The remaining cleanup is to decide what to do with those infallible wrappers in a future breaking release. The clean options are to change them to return Result, deprecate them first and move callers to the try_* methods, or remove them when the builder API next allows a breaking change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions