fix(primitives): move feature-referenced deps from dev-dependencies to optional dependencies (#22103)

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Emma Jamieson-Hoare
2026-02-11 18:50:56 -05:00
committed by GitHub
parent a0b60b7e64
commit 09cd105671
3 changed files with 22 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
---
reth-primitives: patch
---
Moved feature-referenced dependencies from dev-dependencies to optional dependencies to ensure they are available when their corresponding features are enabled.

View File

@@ -20,27 +20,28 @@ reth-static-file-types.workspace = true
# ethereum
alloy-consensus.workspace = true
alloy-primitives = { workspace = true, optional = true }
alloy-rlp = { workspace = true, optional = true }
alloy-eips = { workspace = true, optional = true }
alloy-genesis = { workspace = true, optional = true }
# for eip-4844
c-kzg = { workspace = true, features = ["serde"], optional = true }
# misc
once_cell.workspace = true
reth-codecs = { workspace = true, optional = true }
[dev-dependencies]
# eth
reth-primitives-traits = { workspace = true, features = ["arbitrary", "test-utils"] }
alloy-primitives.workspace = true
alloy-rlp.workspace = true
alloy-eips = { workspace = true, features = ["arbitrary"] }
alloy-genesis.workspace = true
arbitrary = { workspace = true, features = ["derive"] }
proptest-arbitrary-interop.workspace = true
proptest.workspace = true
reth-codecs.workspace = true
criterion.workspace = true

View File

@@ -18,6 +18,18 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(not(feature = "std"), no_std)]
// These are used as optional dependencies solely for feature forwarding.
#[cfg(feature = "alloy-eips")]
use alloy_eips as _;
#[cfg(feature = "alloy-genesis")]
use alloy_genesis as _;
#[cfg(feature = "alloy-primitives")]
use alloy_primitives as _;
#[cfg(feature = "alloy-rlp")]
use alloy_rlp as _;
#[cfg(feature = "reth-codecs")]
use reth_codecs as _;
mod block;
mod receipt;
pub use reth_static_file_types as static_file;