Skip to content

Commit

Permalink
Fixing build issue described in: libp2p/rust-libp2p#2231
Browse files Browse the repository at this point in the history
When including rust-ipfs as a dependency in any crate, it fails with the following error:

```
error: failed to select a version for the requirement `aesni = "^0.7"`
candidate versions found which didn't match: 0.99.99, 0.10.0, 0.9.0, ...
location searched: crates.io index
required by package `aes v0.4.0`
    ... which is depended on by `aes-gcm v0.6.0`
    ... which is depended on by `snow v0.7.1`
    ... which is depended on by `libp2p-noise v0.30.0 (/home/alexander/dev/misc/rust-libp2p/transports/noise)`
    ... which is depended on by `libp2p v0.37.1 (/home/alexander/dev/misc/rust-libp2p)`
    ... which is depended on by `libp2p-relay v0.2.0 (/home/alexander/dev/misc/rust-libp2p/protocols/relay)`
```

This fix updates the libp2p version into one that has a fix for this dependency and now it compiles fine
  • Loading branch information
karim-agha committed Oct 20, 2021
1 parent 111f116 commit 09d4626
Showing 1 changed file with 42 additions and 8 deletions.
50 changes: 42 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,43 @@ bytes = { default-features = false, version = "1" }
cid = { default-features = false, version = "0.5" }
trust-dns-resolver = "0.20"
either = { default-features = false, version = "1.5" }
futures = { default-features = false, version = "0.3.9", features = ["alloc", "std"] }
futures = { default-features = false, version = "0.3.9", features = [
"alloc",
"std",
] }
hash_hasher = "2.0.3"
ipfs-unixfs = { version = "0.2", path = "unixfs" }
libp2p = { default-features = false, features = ["floodsub", "identify", "kad", "tcp-tokio", "mplex", "noise", "ping", "yamux", "dns-tokio"], version = "0.39" }
libp2p = { default-features = false, features = [
"floodsub",
"identify",
"kad",
"tcp-tokio",
"mplex",
"noise",
"ping",
"yamux",
"dns-tokio",
], version = "0.39.1" }
multibase = { default-features = false, version = "0.9" }
multihash = { default-features = false, version = "0.11" }
prost = { default-features = false, version = "0.8" }
serde = { default-features = false, features = ["derive"], version = "1.0" }
serde_json = { default-features = false, features = ["std"], version = "1.0" }
thiserror = { default-features = false, version = "1.0" }
tokio = { default-features = false, features = ["fs", "macros", "rt-multi-thread", "sync"], version = "1.0" }
tokio = { default-features = false, features = [
"fs",
"macros",
"rt-multi-thread",
"sync",
], version = "1.0" }
tokio-stream = { version = "0.1", features = ["fs"] }
tokio-util = { version = "0.6" }
tracing = { default-features = false, features = ["log"], version = "0.1" }
tracing-futures = { default-features = false, features = ["std-future", "std", "futures-03"], version = "0.2" }
tracing-futures = { default-features = false, features = [
"std-future",
"std",
"futures-03",
], version = "0.2" }
void = { default-features = false, version = "1.0" }
fs2 = "0.4.3"
sled = "0.34"
Expand All @@ -55,17 +77,29 @@ prost-build = { default-features = false, version = "0.8" }
criterion = { default-features = false, version = "0.3" }
hex-literal = { default-features = false, version = "0.3" }
sha2 = { default-features = false, version = "0.9" }
tokio = { default-features = false, features = ["io-std", "io-util", "time"], version = "1" }
tracing-subscriber = { default-features = false, features = ["fmt", "tracing-log", "ansi", "env-filter"], version = "0.2" }
rand = { default-features = false, version = "0.8", features = ["std", "std_rng"] }
tokio = { default-features = false, features = [
"io-std",
"io-util",
"time",
], version = "1" }
tracing-subscriber = { default-features = false, features = [
"fmt",
"tracing-log",
"ansi",
"env-filter",
], version = "0.2" }
rand = { default-features = false, version = "0.8", features = [
"std",
"std_rng",
] }
tempfile = "3.1.0"

[[bench]]
name = "hashed-map-cid"
harness = false

[workspace]
members = [ "bitswap", "http", "unixfs" ]
members = ["bitswap", "http", "unixfs"]

# at least these libp2p components need to be patched if you want to use a local version
# libp2p = { path = "../libp2p" }
Expand Down

0 comments on commit 09d4626

Please sign in to comment.