Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Upgrade version of Tokio to ^1.0.1 #131

Merged
merged 1 commit into from
Mar 31, 2021
Merged

Conversation

rhdxmr
Copy link
Collaborator

@rhdxmr rhdxmr commented Mar 27, 2021

This resolves #129 issue.
All example programs work as expected.
All packages of workspace are compiled successfully with stable rust 1.51.0.

@rhdxmr
Copy link
Collaborator Author

rhdxmr commented Mar 27, 2021

And MapIo is marked as deprecated because it implements mio::unix::Evented which is not provided by newer version of mio.

@rhdxmr
Copy link
Collaborator Author

rhdxmr commented Mar 27, 2021

@rsdy I found that the compiling failed under Fedora but succeeded under Ubuntu.
(My local machine uses Ubuntu 20.10 based PopOS)

It seems that AsRawFd trait for RawFd was removed in Apr 2017 by this PR
rust-lang/rust#41035

And the trait was resurrected in Oct 2020 by this PR
rust-lang/rust#76969

A new structure implementing AsRawFd is required to satisfy AsyncFd<T: AsRawFd>.
It's worth avoiding AsyncFd<RawFd> not to cause harm to existing RedBPF users who use rust < 1.48.

@rsdy
Copy link
Collaborator

rsdy commented Mar 27, 2021

It's worth avoiding AsyncFd not to cause harm to existing RedBPF users who use rust < 1.48.

I don't think it's worth it, as it's quite an old release anyway. Realistically with Rust moving to newer LLVM versions, we're going to need to drop support for these anyway. I think targeting the latest stable compiler is reasonable.

@rhdxmr
Copy link
Collaborator Author

rhdxmr commented Mar 28, 2021

@rsdy OK. That's more convenient way to develop this.
Then the build environment of fedora rawhide is needed to fixed to succeed the compilation?

@rsdy rsdy added api-break-major Breaking API changes, requires major version bump enhancement New feature or request labels Mar 28, 2021
Copy link
Collaborator

@rsdy rsdy left a comment

Choose a reason for hiding this comment

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

I think this is a good first step. Removing deprecations can come at a later stage.

@rsdy
Copy link
Collaborator

rsdy commented Mar 28, 2021

Actually all the builds fail, and Fedora too. The fact that Ubuntu builds go through is a separate bug in the CircleCI files.

@rhdxmr
Copy link
Collaborator Author

rhdxmr commented Mar 30, 2021

@rsdy Is there something that should be done in order to merge this PR?

@rsdy
Copy link
Collaborator

rsdy commented Mar 31, 2021

I am currently fixing the CI scripts. I'd prefer if we resolved that issue before merging this PR.

@rsdy
Copy link
Collaborator

rsdy commented Mar 31, 2021

It looks like I misread the CI output. I'll merge this. Thanks!

@rsdy rsdy merged commit 19c2f44 into foniod:main Mar 31, 2021
@rhdxmr rhdxmr mentioned this pull request Mar 31, 2021
@rhdxmr rhdxmr deleted the upgrade-tokio branch May 10, 2021 12:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-break-major Breaking API changes, requires major version bump enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Newer version of Tokio
2 participants