chore(deps): unify duplicate crate versions#1279
Draft
duncanista wants to merge 1 commit into
Draft
Conversation
Bump direct deps to match the transitive graph and collapse duplicate compiled crate versions: - nix 0.26 -> 0.29 (also removes the duplicate bitflags 1.x) - thiserror 1 -> 2 (drop-in; no source changes) - opentelemetry-semantic-conventions 0.30 -> 0.31 (no source changes) - rand 0.8 -> 0.9 (thread_rng->rng, gen->random, OsRng now TryRngCore) nix/bitflags and semconv duplicates fully collapse. The rand 0.8 and thiserror 1.x copies that remain are pulled only by upstream Datadog git crates (dd-trace-rs, serverless-components, libdatadog) and cannot be removed from this repo.
Contributor
|
12 tasks
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.
Jira: none yet — add before marking ready.
Overview
Dependency-hygiene change (Confluence H12): bump our direct dependencies in
bottlecap/Cargo.tomlto match the versions the transitive graph already pulls in, collapsing duplicate compiled crate versions. Fewer duplicate crates means a smaller dependency graph and faster, lighter builds.Bumps landed:
nixsysconf/SysconfVar/statfspaths & signatures unchanged. Also eliminates the duplicatebitflags 1.x(nix 0.26 pulled bitflags 1; nix 0.29 uses bitflags 2).thiserroropentelemetry-semantic-conventionssrc/otlp/transform.rsare unchanged.randsrc/lifecycle/invocation/mod.rs:thread_rng()->rng(),Rng::gen()->Rng::random(), andOsRngnow implementsTryRngCoreinstead ofRngCore(usetry_next_u64()with a thread-RNG fallback instead ofnext_u64()).No bumps were skipped — all four landed cleanly.
Files / call-sites changed
bottlecap/Cargo.toml— four version bumps (nix, thiserror, rand, opentelemetry-semantic-conventions).bottlecap/Cargo.lock— regenerated bycargo build.bottlecap/src/lifecycle/invocation/mod.rs—generate_span_id()updated for the rand 0.9 API (only source file needing changes).Note on remaining
rand/thiserrorduplicatescargo tree -dstill listsrand 0.8andthiserror 1.xafter this change. Those copies are not reachable from our direct deps anymore — they are pulled exclusively by upstream Datadog git crates (dd-trace-rs/datadog-opentelemetry,serverless-components/dogstatsd+datadog-agent-config, and thelibdatadoglibdd-*crates), plusmultipartforrand. They can only be collapsed by bumping those upstream crates, which is out of scope here. The duplicates this PR's direct deps fully control —nix(+bitflags 1.x) andopentelemetry-semantic-conventions— are eliminated.Testing
cargo fmt --manifest-path bottlecap/Cargo.toml— clean.cargo clippy --manifest-path bottlecap/Cargo.toml --bin bottlecap --no-deps— clean (crate deniesclippy::all+pedantic+unwrap_used). Also ran--all-targets(lib + tests) clean. Only output is the pre-existingbuf_redux/multipartfuture-incompat warning.cargo build --bin bottlecap— succeeds.cargo tree -devidence (targeted crates)Before:
After:
bitflags 1.3.2,nix 0.26.4, andopentelemetry-semantic-conventions 0.30.0are gone (3 duplicate compiled crates eliminated). TheCargo.locknow lists a single version each ofnix(0.29.0),opentelemetry-semantic-conventions(0.31.0), andbitflags(2.11.0).