Skip to content

build(deps): depend on alloy-primitives instead of the alloy umbrella (0.2.0) - #24

Open
dependabot[bot] wants to merge 2 commits into
mainfrom
dependabot/cargo/alloy-1.0.30
Open

build(deps): depend on alloy-primitives instead of the alloy umbrella (0.2.0)#24
dependabot[bot] wants to merge 2 commits into
mainfrom
dependabot/cargo/alloy-1.0.30

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 8, 2025

Copy link
Copy Markdown
Contributor

Replaces the alloy umbrella dependency with alloy-primitives 1.6.1, and releases it as 0.2.0.

Does this break our code? No.

Consumer Impact
credible-sdk None. Depends with default-features = false, so the alloy feature is never enabled and these impls don't compile in. Uses only rust_tracing::trace() (11 main.rs call sites); no FromEnvVar usage anywhere. Already resolves alloy-primitives 1.6.1.
pcl None. Does not depend on rust-tracing.
Existing pins None. Consumed by git tag (0.1.3, 0.1.4); those tags keep resolving as before.
External Not applicable — this crate is not published to crates.io.

It is still an API break in principle, which is why this ships as 0.2.0 rather than a patch: alloy 0.12 resolves alloy-primitives 0.8 (via alloy-core ^0.8.22), and 0.8 vs 1.x are semver-incompatible, so cargo keeps both side by side. Anyone enabling the alloy feature while on alloy 0.12 would find their Address/Bytes/U256/FixedBytes no longer implement FromEnvVar. Keeping the feature name does not preserve that — thanks @mateo-mro for catching it. No such consumer exists today, so retaining parallel 0.8 and 1.x impl blocks would be maintenance cost for a code path nobody enables.

Why drop the umbrella

The crate uses exactly four alloy items — Address, Bytes, U256, FixedBytes — all in alloy-primitives. Reaching them through the umbrella meant tracking alloy's release cadence for two pure re-export shims (alloy, alloy-core).

That cadence is the real cost: alloy cut seven breaking version lines in eighteen months (0.11 → 0.12 → 0.13 → 0.14 → 0.15 → 1.x → 2.x), and this repo opened fourteen bump PRs of which thirteen were superseded before they could merge — leaving the dependency pinned to 0.12.6 the entire time. alloy-primitives has been on 1.x since mid-2025, so semver-compatible updates become lockfile-only.

The requirement is "1.6.1" (i.e. ^1.6.1, a floor) rather than "=1.6.1". An exact pin would hard-fail consumer resolution the moment anything else in their graph needs 1.7+, since =1.6.1 and ^1.7 have no overlap and cargo cannot keep two same-major copies.

No RPC crate is added — the crate has no RPC, provider, transport or network usage, so an alloy-rpc-* dependency would be unused and cargo shear would reject it.

Rebased onto current main, preserving the serde (#31), tracing-journald (#32) and metrics (#34) bumps that landed while this was open.

Validated with nightly formatting, strict Clippy, workspace tests and doctests, docs with warnings denied, and cargo shear.

Post-merge: cut tag 0.2.0, then bump consumers that want it.

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Resolves ENG-4723

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Sep 8, 2025
@dependabot
dependabot Bot force-pushed the dependabot/cargo/alloy-1.0.30 branch from b74c3b4 to d362998 Compare October 7, 2025 09:40
@CLAassistant

CLAassistant commented Feb 26, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@lean-apple lean-apple changed the title build(deps): bump alloy from 0.12.6 to 1.0.30 build(deps): bump alloy from 0.12.6 to 2.2.0 Jul 27, 2026
@socket-security

socket-security Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedalloy-primitives@​0.8.25 ⏵ 1.6.110010093100100

View full report

lean-apple
lean-apple previously approved these changes Jul 27, 2026
@dependabot @github

dependabot Bot commented on behalf of github Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

A newer version of alloy exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

@lean-apple
lean-apple force-pushed the dependabot/cargo/alloy-1.0.30 branch 2 times, most recently from c05b1eb to 8f64f39 Compare August 3, 2026 20:00
@lean-apple lean-apple changed the title build(deps): bump alloy from 0.12.6 to 2.2.0 build(deps): bump alloy from 0.12.6 to 2.3.0 Aug 3, 2026
@lean-apple
lean-apple force-pushed the dependabot/cargo/alloy-1.0.30 branch from 8f64f39 to 9f17768 Compare August 3, 2026 20:09
@lean-apple lean-apple changed the title build(deps): bump alloy from 0.12.6 to 2.3.0 build(deps): depend on alloy-primitives instead of the alloy umbrella Aug 3, 2026
Comment thread Cargo.toml Outdated
# Other
thiserror = "2.0.11"
alloy = { version = "0.12.6", optional = true, default-features = false, features = ["std"] }
alloy-primitives = { version = "1.6", optional = true, default-features = false, features = ["std"] }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing consumers can still be using alloy 0.12, whose Address and the other primitive types come from alloy_primitives 0.8. This switches the impls to alloy_primitives 1.x, so Cargo will keep both versions and those existing types will no longer implement FromEnvVar. Keeping the feature name does not preserve that API. Could we either retain compatibility for 0.8 or call this out and release it as a breaking change?

The crate uses exactly four alloy items -- Address, Bytes, U256 and
FixedBytes -- all of which live in alloy-primitives. Pulling the umbrella
crate in to reach them meant tracking alloy's release cadence for two
pure re-export shims (alloy and alloy-core).

That cadence is the real cost. alloy cut seven breaking lines in eighteen
months (0.11 through 2.x), and this repo opened fourteen bump PRs of which
thirteen were superseded before they could merge, leaving the dependency
stuck on 0.12.6 the whole time. alloy-primitives has been on 1.x since
mid-2025, so semver-compatible updates become lockfile-only.

The requirement names 1.6.1 as the floor because that is what the graph
resolves to today; anything older lacks the primitives this relies on.

This is an API break for consumers that enable the `alloy` feature while
on alloy 0.12, whose primitives come from alloy-primitives 0.8: cargo
keeps 0.8 and 1.x side by side, so their types stop satisfying FromEnvVar.
The feature name is unchanged, but that does not preserve those impls.
@lean-apple
lean-apple force-pushed the dependabot/cargo/alloy-1.0.30 branch from 9f17768 to cd906f6 Compare August 3, 2026 20:30
Moving the alloy primitives requirement from 0.8 to 1.x changes which
types carry the FromEnvVar impls, so consumers enabling the `alloy`
feature while on alloy 0.12 lose them. Marking that with a minor bump,
which is the breaking position for a 0.x crate, rather than shipping it
as a patch.
@lean-apple lean-apple changed the title build(deps): depend on alloy-primitives instead of the alloy umbrella build(deps): depend on alloy-primitives instead of the alloy umbrella (0.2.0) Aug 3, 2026
Comment thread src/utils/from_env.rs
alloy::primitives::Address,
alloy::primitives::Bytes,
alloy::primitives::U256
alloy_primitives::Address,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes the concrete primitive types that receive FromEnvVar, but the test module still does not exercise any of these implementations. A feature wiring mistake or a parsing regression would compile without proving the public behavior. Could we add one enabled feature test for Address and FixedBytes so the new surface is covered?

@linear-code

linear-code Bot commented Aug 18, 2026

Copy link
Copy Markdown

ENG-4723

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants