You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trying to import lighthouse deps into another rust project leads to failed version requirements.
eg, trying to add the lighthouse_network crate using cargo add --path ../lighthouse/beacon_node/lighthouse_network leads to the error: error: failed to select a version for the requirement eth2_ssz = "^0.4.1" bc the crates link only goes up to 0.4.0.
note: this isnt a problem when building the project because eth2_ssz = "^0.4.1" is defined locally in consensus/ssz/Cargo.toml
~ cat consensus/ssz/Cargo.toml
[package]
name = "eth2_ssz"
version = "0.4.1"
Version
stable
Steps to resolve
i think changing the eth2_ssz requirements (and other local dependencies which have this same problem) to be path dependent would solve this problem but open to other solns
also happy to to open a PR and fix this myself when i get confirmation this is the right approach to fix - thanks! :)
The text was updated successfully, but these errors were encountered:
It's possible to work-around the errors by using a [patch] section in your repo that follows the [patch] section in Lighthouse's top-level Cargo.toml. For examples of this, see these two external repos:
Long-term, our aim is to remove the [patch] section entirely by publishing our utility crates to crates.io. This will make it easier to use crates from Lighthouse (no more patch section) and the published crates can be used independently. You could even do this now if you are only interested in e.g. ssz or tree_hash. See this PR: #3890
Description
trying to import lighthouse deps into another rust project leads to failed version requirements.
eg, trying to add the
lighthouse_network
crate usingcargo add --path ../lighthouse/beacon_node/lighthouse_network
leads to the error:error: failed to select a version for the requirement eth2_ssz = "^0.4.1"
bc the crates link only goes up to0.4.0
.note: this isnt a problem when building the project because
eth2_ssz = "^0.4.1"
is defined locally inconsensus/ssz/Cargo.toml
Version
stable
Steps to resolve
i think changing the
eth2_ssz
requirements (and other local dependencies which have this same problem) to be path dependent would solve this problem but open to other solnsalso happy to to open a PR and fix this myself when i get confirmation this is the right approach to fix - thanks! :)
The text was updated successfully, but these errors were encountered: