Change infallible custom DNS constructors in a future release
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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