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

Feature "tokio" does not compile with rustc 1.77.1 #69

Open
pawurb opened this issue Apr 5, 2024 · 3 comments
Open

Feature "tokio" does not compile with rustc 1.77.1 #69

pawurb opened this issue Apr 5, 2024 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@pawurb
Copy link
Contributor

pawurb commented Apr 5, 2024

Hi. Trying to build project with rustc 1.77.1 and tokio feature enabled outputs multiple compile errors.

  --> /Users/pablo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-io-0.3.30/src/lib.rs:60:12

error[E0308]: mismatched types
  --> /Users/pablo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cacache-13.0.0/src/get.rs:46:9
   |
45 |     ) -> Poll<tokio::io::Result<()>> {
   |          --------------------------- expected `Poll<std::result::Result<(), std::io::Error>>` because of return type
46 |         Pin::new(&mut self.reader).poll_read(cx, buf)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Poll<Result<(), Error>>`, found `Poll<Result<usize, Error>>`
   |
   = note: expected enum `Poll<std::result::Result<(), _>>`
              found enum `Poll<std::result::Result<usize, _>>`

error[E0599]: no method named `poll_shutdown` found for struct `Pin<&mut AsyncWriter>` in the current scope
   --> /Users/pablo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cacache-13.0.0/src/put.rs:170:36
    |
170 |         Pin::new(&mut self.writer).poll_shutdown(cx)
    |                                    ^^^^^^^^^^^^^ method not found in `Pin<&mut AsyncWriter>`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `poll_shutdown`, perhaps you need to implement it:
            candidate #1: `tokio::io::AsyncWrite`

As a result I cannot use versions 0.13.0 with my project, it still works with 0.12.0. Could you look into resolving it?

@zkat
Copy link
Owner

zkat commented Apr 6, 2024

...did tokio seriously do a breaking change on their reader signatures in a non-semver-major release? seriously?

@zkat zkat added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Apr 6, 2024
@zkat
Copy link
Owner

zkat commented Apr 6, 2024

Anyway this should be a straightforward fix, although I'd like to know what the tokio version shenanigans are. Happy to take and discuss a PR for this.

@pawurb
Copy link
Contributor Author

pawurb commented Apr 6, 2024

I think it's tokio 1.37.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants