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

Upgrade async-std to 1.6.1 #1612

Closed
wants to merge 3 commits into from
Closed

Upgrade async-std to 1.6.1 #1612

wants to merge 3 commits into from

Conversation

secretfader
Copy link

@secretfader secretfader commented Jun 17, 2020

Resolves #1588, and allows libp2p to be used in projects that rely on the latest version of async-std.

@mxinden
Copy link
Member

mxinden commented Jun 17, 2020

Have the failures related to #1588 been addressed?

@secretfader
Copy link
Author

@mxinden I'm not familiar with the issues encountered earlier in #1588. In fact, I hadn't seen that issue until now. My primary goal was to reconcile dependency versions of async-std with requirements of a project that uses libp2p.

If I understand correctly, the original issue was that CI broke with the update of async-std to 1.6.0.. Based on what I can see here, it seems all CI checks have passed except one.

@secretfader
Copy link
Author

After re-reading #1588, I see the problem is with the Noise protocol smoke test, which I'll attempt to resolve here.

@secretfader secretfader changed the title Upgrade async-std to 1.6.1 WIP: Upgrade async-std to 1.6.1 Jun 17, 2020
@secretfader secretfader changed the title WIP: Upgrade async-std to 1.6.1 Upgrade async-std to 1.6.1 Jun 17, 2020
@secretfader
Copy link
Author

@mxinden Tests are passing with async-std version 1.6.1, which should resolve #1588. The problem? Tests were assuming an available runtime to schedule async tasks against, but found none and stalled execution instead.

While including async-std everywhere async tests will need to run is an imperfect solution, but one I'm comfortable accepting temporarily (until we find a more ergonomic and performant method).

@tomaka
Copy link
Member

tomaka commented Jun 18, 2020

It would be very unsettling if async-std now forced you to use their runtime for the sockets to work. This isn't mentioned in their CHANGELOG, and the main reason why we were using async-std in the first place is that you didn't have to do that.

@stjepang @dignifiedquire Sorry to ping you here, but could I ask you if it is an expected behaviour that sockets don't work if you don't use #[async_std::test]?

@dignifiedquire
Copy link
Member

@tomaka @secretfader when you are saying you are not using the runtime, are you manually polling the sockets, or how exactly is the setup you are expecting to work?

@dignifiedquire
Copy link
Member

dignifiedquire commented Jun 18, 2020

if it is an expected behaviour that sockets don't work if you don't use #[async_std::test]

The goal is to have them work, when polling manually, independent of the runtime that is polling them. The current situation for TcpStream::connect is the following

This isn't mentioned in their CHANGELOG

Because I did not realize this behaviour had chaneged, and it was not my intention to bind the sockets to the runtime in this way. I am considering this a bug in the 1.6 releases, and effectively for the cases it is happening in 1.5 too. I am sorry for the troubles this is causing.

@dignifiedquire
Copy link
Member

After speaking @stjepang I realized my analysis above was wrong. We need to ensure that the reactor is running when creating sockets, which is simply in bug in async-std atm. Going to attempt a fix and see if I can get libp2ps test working out of the box

@dignifiedquire
Copy link
Member

Good news, I have a working fix for async-std, which I will be publishing once CI and review are done. This will allow you to upgrade without any other changes to the tests, as it was intended.

dignifiedquire added a commit to dignifiedquire/rust-libp2p that referenced this pull request Jun 19, 2020
dignifiedquire added a commit to dignifiedquire/rust-libp2p that referenced this pull request Jun 21, 2020
romanb added a commit that referenced this pull request Jun 29, 2020
Ref #1612

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
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.

CI failing because of async-std 1.6
4 participants