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

Conversation

romanb
Copy link
Contributor

@romanb romanb commented May 25, 2020

This PR temporarily and conservatively bounds all async-std dependencies in libp2p to < 1.6 as at least the noise smoke tests seem to stall with 1.6. This is just a temporary defensive measure to stabilise CI and avoid surprises in releases, until the underlying issue has been figured out and #1588 has been resolved.

@romanb
Copy link
Contributor Author

romanb commented May 25, 2020

Is the rustdoc-links check failure a nightly rust issue maybe? Any hints?

@@ -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.

@tomaka tomaka merged commit 25dc7c0 into libp2p:master May 25, 2020
@romanb romanb deleted the bound-async-std branch May 25, 2020 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants