libp2p / libp2p/rust-libp2p

Change infallible custom DNS constructors in a future release

Open
#6,420 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
5.6k
Forks
1.3k
Avg merge
8h 47m
Merged PRs (30d)
19

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing PR #6418 and the existing libp2p_dns::tokio::Transport::custom and libp2p::SwarmBuilder::with_dns_config entry points alongside their try_* counterparts. Compare the compatibility and breaking-release options, then define a future-release plan whose chosen treatment of the infallible wrappers is documented and agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.