chore(deps)!: resolve dig-nat ^0.14 + dig-dht ^0.8 (cascade #1686) - #14
Merged
MichaelTaylor3d merged 1 commit intoJul 27, 2026
Merged
Conversation
MichaelTaylor3d
marked this pull request as ready for review
July 27, 2026 10:11
The 0.6.0 release pinned `dig-nat = "0.13"` / `dig-dht = "0.7"` before
dig-nat 0.14 existed. A `0.x` minor is semver-INCOMPATIBLE, so `"0.13"`
means `>=0.13.0, <0.14.0` and could never resolve 0.14.0. While this
crate stayed on those requirements, dig-node's tree resolved TWO
`dig-nat` and TWO `dig-dht` versions and failed to compile:
error[E0308]: expected `dig_nat::relay::RelayStatus`,
found `dig_nat::RelayStatus`
note: there are multiple different versions of crate `dig_nat`
For a `0.x` dep bump, every node on every path from the dep to the final
consumer must be bumped; one un-bumped node forces duplicate resolution
for the whole graph. This crate is one of the last two such nodes.
No code migration was required, and that was verified at the published
sources rather than assumed: dig-nat 0.14.0's public identifier set gains
exactly `ChunkLensAssembler`, `ChunkLensError`,
`MAX_RESOURCE_CHUNK_COUNT` (plus a new `RangeFrame` method) and loses
nothing, and dig-dht 0.8.0's `src/` is byte-identical to 0.7.0's — a
manifest-only release carrying just its own `dig-nat = "0.14"` bump.
`CandidateAddr` is still not `#[non_exhaustive]`, so the literal
construction in `src/registry.rs` continues to compile.
BREAKING CHANGE: the re-exported dep types change identity for
consumers. Re-derived against the 0.14.0/0.8.0 sources rather than
inherited from the prior bump: five of the six types this crate
re-exports are dep-OWNED — `TraversalKind` (dig-nat
`src/method/mod.rs`), `ContentId` (dig-dht `src/content.rs`), and
`AddressKind` / `CandidateAddr` / `ProviderRecord` (all three in dig-dht
`src/record.rs`). `PeerId` is the lone exception: it is defined in
dig-tls `src/identity.rs` and merely re-exported through dig-nat, and
dig-nat 0.13 and 0.14 both require `dig-tls = "0.3"`, so cargo unifies
it and `PeerId` alone would have justified only a patch.
Refs DIG-Network/dig_ecosystem#1686
Co-Authored-By: Claude <noreply@anthropic.com>
MichaelTaylor3d
force-pushed
the
chore/cascade-1686-dig-nat-0.14-dig-dht-0.8
branch
from
July 27, 2026 10:11
a11b68a to
f9fb403
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Bumps this crate's only two dig dependencies onto
dig-nat = "0.14"anddig-dht = "0.8", and releases 0.6.0 → 0.7.0. No source file changed — this is a manifest + lockfile bump.Why — the
0.xcascade ruleA
0.xMINOR is semver-incompatible:"0.13"means>=0.13.0, <0.14.0, so the previous requirements could never resolve the published 0.14.0 / 0.8.0. While this crate stayed on^0.13/^0.7, dig-node's tree resolved twodig-natand twodig-dhtversions and hit a hard compile break:The 0.6.0 release was cut onto
^0.13/^0.7before dig-nat 0.14 existed, so this second hop was unavoidable. For a0.xdep bump, every node on every path from the dep to the final consumer must be bumped — a single un-bumped node forces duplicate resolution for the whole graph. This crate was one of the last two such nodes.No code migration — verified, not assumed
src/lib.rsacross the two published sources: zero removals, three additions (ChunkLensAssembler,ChunkLensError,MAX_RESOURCE_CHUNK_COUNT), plus a newRangeFramemethod insrc/mux.rs. Onlylib.rsandmux.rsdiffer at all.src/is byte-identical to 0.7.0's (diff -rqreports no differences) — a manifest-only release carrying just its owndig-nat = "0.14"bump.CandidateAddris still not#[non_exhaustive], so the literalCandidateAddr { .. }construction insrc/registry.rscontinues to compile (no E0639).All 61 tests pass unmodified, which is the substantive evidence that both additivity claims hold.
Version rationale — MINOR (0.6.0 → 0.7.0)
The rule: a dep bump over a re-exporting crate is breaking IFF the re-exported type is dep-OWNED; if it re-exports from a deeper crate both dep versions agree on, cargo unifies and a patch would be honest. Re-derived against the 0.14.0/0.8.0 sources rather than inherited from the prior bump:
TraversalKindsrc/method/mod.rs:46ContentIdsrc/content.rs:36AddressKindsrc/record.rs:27CandidateAddrsrc/record.rs:58ProviderRecordsrc/record.rs:276PeerIdsrc/identity.rs:16, merely re-exported through dig-natlib.rs:93Five of six are dep-owned → MINOR (0.x minor-position signals breaking-for-consumers).
PeerIdis the lone exception: dig-nat 0.13 and 0.14 both declaredig-tls = "0.3", so cargo unifies it andPeerIdalone would have justified only a patch.Correction to the 0.6.0 changelog narrative: it stated the four candidate-feed types live in "
src/content.rs,src/record.rs" collectively. The actual split isContentIdincontent.rsandAddressKind/CandidateAddr/ProviderRecordall three inrecord.rs. The ownership conclusion is unchanged; the file attribution is now precise, because a changelog carrying a loose type-identity claim becomes the rule a later cascade level cites.Blast radius checked
This crate's public surface is unchanged in shape; only the identity of the six re-exported dep types moves (table above). Internal consumers of those types:
src/registry.rs(CandidateAddr— incl. the literal construction),src/lib.rs(the re-exports),src/types.rs/engine.rs(PeerId,ContentId,TraversalKindas pure value types). The crate constructs or encodes none of dig-nat's mux wire types (RangeFrame,RangeRequest,Availability*), which is why the 0.12#[non_exhaustive]cutover and the 0.14 chunk-lens additions cannot reach it. Downstream, the intended beneficiary is dig-node, whose duplicate-dig_natresolution this unblocks.Lock singularity — proven, not grepped
cargo update -p dig-nat -p dig-dhtmoved exactly two packages with zero transitive churn.How verified (local, pre-CI)
cargo test --locked --all-features— 46 unit + 15 conformance + 0 doc, all pass, no source editscargo clippy --locked --all-targets --all-features -- -D warnings— cleancargo fmt --check— cleanRUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps— cleancargo llvm-cov nextest --locked --all --profile ci --fail-under-lines 80— 96.19% lines / 96.49% regions / 94.39% functions, 61 testscargo publish --dry-run --locked— packages and compiles from the packaged tarball; no[patch.crates-io]presentRefs DIG-Network/dig_ecosystem#1686