mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Ensure sqlite and rusqlite are optional in consensus/types (#7182)
Even though the `consensus/types` crate has a feature named `sqlite`, it unconditionally depends on the `rusqlite` crate, which then depends on the `sqlite` crate — even when the feature is disabled. When the feature is disabled, the code that imports from `rusqlite` is disabled, so this dependency is not needed when the feature is disabled. This is not a problem for Lighthouse itself, but I’m interested in using the types defined here in a different Rust project, which depends on a conflicting version of the `sqlite` crate. Ensure that the dependency on `rusqlite` is only present when the `sqlite` feature is enabled.
This commit is contained in:
committed by
GitHub
parent
3f6c11db0e
commit
9dce729cb6
@@ -38,7 +38,7 @@ rand_xorshift = "0.3.0"
|
|||||||
rayon = { workspace = true }
|
rayon = { workspace = true }
|
||||||
regex = { workspace = true }
|
regex = { workspace = true }
|
||||||
rpds = { workspace = true }
|
rpds = { workspace = true }
|
||||||
rusqlite = { workspace = true }
|
rusqlite = { workspace = true, optional = true }
|
||||||
safe_arith = { workspace = true }
|
safe_arith = { workspace = true }
|
||||||
serde = { workspace = true, features = ["rc"] }
|
serde = { workspace = true, features = ["rc"] }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
@@ -64,7 +64,7 @@ tokio = { workspace = true }
|
|||||||
default = ["sqlite", "legacy-arith"]
|
default = ["sqlite", "legacy-arith"]
|
||||||
# Allow saturating arithmetic on slots and epochs. Enabled by default, but deprecated.
|
# Allow saturating arithmetic on slots and epochs. Enabled by default, but deprecated.
|
||||||
legacy-arith = []
|
legacy-arith = []
|
||||||
sqlite = []
|
sqlite = ["dep:rusqlite"]
|
||||||
# The `arbitrary-fuzz` feature is a no-op provided for backwards compatibility.
|
# The `arbitrary-fuzz` feature is a no-op provided for backwards compatibility.
|
||||||
# For simplicity `Arbitrary` is now derived regardless of the feature's presence.
|
# For simplicity `Arbitrary` is now derived regardless of the feature's presence.
|
||||||
arbitrary-fuzz = []
|
arbitrary-fuzz = []
|
||||||
|
|||||||
Reference in New Issue
Block a user