Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporarily bound all async-std dependencies. #1589

Merged
merged 2 commits into from
May 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ libp2p-tcp = { version = "0.19.0", path = "transports/tcp", optional = true }
libp2p-websocket = { version = "0.19.0", path = "transports/websocket", optional = true }

[dev-dependencies]
async-std = "1.0"
async-std = "< 1.6"
Copy link
Member

Choose a reason for hiding this comment

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

Would this allow versions below 1.0 to be used? If so how about >=1.0, < 1.6.

Copy link
Member

Choose a reason for hiding this comment

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

I can't find anything about that in the docs, but it might indeed be the case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it really matters as cargo prefers newer versions, doesn't it? Do you think the lower bound is important?

Copy link
Member

@tomaka tomaka May 25, 2020

Choose a reason for hiding this comment

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

There's a general problem in the Rust ecosystem: you might be using features introduced in foo v1.1 but only have foo v1.0 in your dependencies. Cargo is theoretically allowed to depend on foo v1.0, which would make the compilation fail.

This issue is present a bit everywhere in the ecosystem, but people don't realize it because as you said Cargo prefers newer versions.

I'd say we're in the same situation here, so I'm tempted to not care.

Copy link
Contributor

Choose a reason for hiding this comment

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

Mmh, due to semver libp2p selects a version smaller than 1.0, so 0.99 gets selected currently. I think the correct fix would be =1.5

Copy link
Member

Choose a reason for hiding this comment

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

Yeah we've actually been bitten by it in Polkadot and released two versions with an old async-std (that had the bug with a high number of threads being spawned) without realizing.

env_logger = "0.7.1"

[workspace]
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ zeroize = "1"
ring = { version = "0.16.9", features = ["alloc", "std"], default-features = false }

[dev-dependencies]
async-std = "1.0"
async-std = "< 1.6"
libp2p-mplex = { version = "0.19.0", path = "../muxers/mplex" }
libp2p-secio = { version = "0.19.0", path = "../protocols/secio" }
libp2p-tcp = { version = "0.19.0", path = "../transports/tcp" }
Expand Down
2 changes: 1 addition & 1 deletion misc/multistream-select/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ smallvec = "1.0"
unsigned-varint = "0.3.2"

[dev-dependencies]
async-std = "1.2"
async-std = "< 1.6"
quickcheck = "0.9.0"
rand = "0.7.2"
rw-stream-sink = "0.2.1"
2 changes: 1 addition & 1 deletion muxers/mplex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ parking_lot = "0.10"
unsigned-varint = { version = "0.3", features = ["futures-codec"] }

[dev-dependencies]
async-std = "1.0"
async-std = "< 1.6"
libp2p-tcp = { version = "0.19.0", path = "../../transports/tcp" }
2 changes: 1 addition & 1 deletion protocols/deflate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ libp2p-core = { version = "0.19.0", path = "../../core" }
flate2 = "1.0"

[dev-dependencies]
async-std = "1.0"
async-std = "< 1.6"
libp2p-tcp = { version = "0.19.0", path = "../../transports/tcp" }
rand = "0.7"
quickcheck = "0.9"
2 changes: 1 addition & 1 deletion protocols/gossipsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ smallvec = "1.1.0"
prost = "0.6.1"

[dev-dependencies]
async-std = "1.4.0"
async-std = "< 1.6"
env_logger = "0.7.1"
libp2p-plaintext = { version = "0.19.0", path = "../plaintext" }
libp2p-yamux = { version = "0.19.0", path = "../../muxers/yamux" }
Expand Down
2 changes: 1 addition & 1 deletion protocols/identify/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ smallvec = "1.0"
wasm-timer = "0.2"

[dev-dependencies]
async-std = "1.0"
async-std = "< 1.6"
libp2p-mplex = { version = "0.19.0", path = "../../muxers/mplex" }
libp2p-secio = { version = "0.19.0", path = "../../protocols/secio" }
libp2p-tcp = { version = "0.19.0", path = "../../transports/tcp" }
Expand Down
2 changes: 1 addition & 1 deletion protocols/mdns/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]

[dependencies]
async-std = "1.0"
async-std = "< 1.6"
data-encoding = "2.0"
dns-parser = "0.8"
either = "1.5.3"
Expand Down
2 changes: 1 addition & 1 deletion protocols/noise/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ snow = { version = "0.6.1", features = ["default-resolver"], default-features =

[dev-dependencies]
env_logger = "0.7.1"
libp2p-tcp = { version = "0.19.0", path = "../../transports/tcp" }
libp2p-tcp = { version = "0.19.0", path = "../../transports/tcp", features = ["async-std"] }
quickcheck = "0.9.0"
sodiumoxide = "^0.2.5"

Expand Down
2 changes: 1 addition & 1 deletion protocols/ping/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void = "1.0"
wasm-timer = "0.2"

[dev-dependencies]
async-std = "1.0"
async-std = "< 1.6"
libp2p-tcp = { version = "0.19.0", path = "../../transports/tcp" }
libp2p-secio = { version = "0.19.0", path = "../../protocols/secio" }
libp2p-yamux = { version = "0.19.0", path = "../../muxers/yamux" }
Expand Down
2 changes: 1 addition & 1 deletion protocols/secio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ secp256k1 = []
aes-all = ["aesni"]

[dev-dependencies]
async-std = "1.0"
async-std = "< 1.6"
criterion = "0.3"
libp2p-mplex = { version = "0.19.0", path = "../../muxers/mplex" }
libp2p-tcp = { version = "0.19.0", path = "../../transports/tcp" }
Expand Down
2 changes: 1 addition & 1 deletion transports/tcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]

[dependencies]
async-std = { version = "1.0", optional = true }
async-std = { version = "< 1.6", optional = true }
futures = "0.3.1"
futures-timer = "3.0"
get_if_addrs = "0.5.3"
Expand Down
2 changes: 1 addition & 1 deletion transports/uds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]

[target.'cfg(all(unix, not(any(target_os = "emscripten", target_os = "unknown"))))'.dependencies]
async-std = { version = "1.0", optional = true }
async-std = { version = "< 1.6", optional = true }
libp2p-core = { version = "0.19.0", path = "../../core" }
log = "0.4.1"
futures = "0.3.1"
Expand Down