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

Compile error when using futures-task v0.3.31 #199

Closed
twosatsmaxi opened this issue Oct 6, 2024 · 6 comments
Closed

Compile error when using futures-task v0.3.31 #199

twosatsmaxi opened this issue Oct 6, 2024 · 6 comments

Comments

@twosatsmaxi
Copy link

error[E0310]: the parameter type `S` may not live long enough
   --> /Users/alpesh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zeromq-0.4.0/src/fair_queue.rs:120:29
    |
120 |             let waker_ref = waker_ref(&waker);
    |                             ^^^^^^^^^^^^^^^^^
    |                             |
    |                             the parameter type `S` must be valid for the static lifetime...
    |                             ...so that the type `S` will meet its required lifetime bounds
    |
help: consider adding an explicit lifetime bound
    |
89  |     S: Stream<Item = T> + Send + 'static,
    |                                +++++++++

@twosatsmaxi
Copy link
Author

with very simple proxy example

    // Create frontend and backend sockets
    let mut in_ = zeromq::RouterSocket::new();
    let mut out_ = zeromq::DealerSocket::new();;

    // Bind the sockets
    in_.bind("tcp://*:5559").await?;
    out_.bind("tcp://*:5560").await?;

    // Create the proxy
    info!("Starting proxy");
    zeromq::proxy(&in_, &out_, None).await?;
    info!("Proxy started");

@PaoloPana
Copy link
Contributor

Hi @twosatsmaxi, for this issue I created a PR: #198

@jb-alvarado
Copy link

I have the same problem, running cargo update breaks zmq.rs. Thanks for your patch @PaoloPana!

theoparis added a commit to theoparis/zed that referenced this issue Oct 7, 2024
@artob
Copy link

artob commented Oct 9, 2024

Have the same problem after upgrading to Rust 1.81.

artob added a commit to AsimovPlatform/protoflow that referenced this issue Oct 9, 2024
@davidlattimore davidlattimore changed the title Getting this issue when running in rust 1.80 Compile error when using futures-task v0.3.31 Oct 9, 2024
@davidlattimore
Copy link
Collaborator

The problem isn't the Rust version, it's due to a change in futures-task v0.3.31. @PaoloPana sent a PR, which I've merged. I suspect it might be worthwhile doing a release with the fix, but I'm not sure of the release process for this crate. I could probably just manually cargo publish, git tag and create release through the github UI, but I'll wait a day or two to see if anyone who has done releases of this in the past jumps in.

@davidlattimore
Copy link
Collaborator

I've released v0.4.1 here and on crates.io.

theoparis added a commit to theoparis/zed that referenced this issue Oct 28, 2024
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

No branches or pull requests

5 participants