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

build error: no method named is_empty found for struct UnboundedSender in the current scope #3053

Open
1 of 3 tasks
dan-arnold opened this issue Oct 14, 2024 · 2 comments
Open
1 of 3 tasks

Comments

@dan-arnold
Copy link

dan-arnold commented Oct 14, 2024

Problem

UnboundedSender::is_empty is only present in >= futures-channel-0.3.29, but is used by dioxus-core despite dioxus only depending on futures-channel-0.3.21.

If dioxus is used as a dependency in another project that resolves the futures-channel dependency to a version < 0.3.29, this causes a build failure:

error[E0599]: no method named `is_empty` found for struct `UnboundedSender` in the current scope
  --> [snip]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/dioxus-core-0.6.0-alpha.2/src/reactive_context.rs:65:20
   |
65 |             if !tx.is_empty() {
   |                    ^^^^^^^^ method not found in `UnboundedSender<_>`

Steps To Reproduce

Steps to reproduce the behavior:

  • Change the futures-channel dependency version to 0.28.0 (emulating a project that has other dependencies that end up resolving the futures-channel dependency to version 0.28.0 of the package)
  • $ cargo build

Expected behavior

  • build should succeed

Environment:

  • Dioxus version: main
  • Rust version: 1.81.0
  • OS info: GNU/Linux 6.6.51 (Gentoo)
  • App platform: desktop

Questionnaire

  • I'm interested in fixing this myself but don't know where to start
  • I would like to fix and I have a solution
  • I don't have time to fix this right now, but maybe later
@dan-arnold
Copy link
Author

dan-arnold commented Oct 14, 2024

I tried bumping to the latest version of futures-channel, 0.31.0, ran all the tests described in the contribution guide, and everything builds successfully and passes. I can make a PR if you'd like.

@ealmloff
Copy link
Member

I tried bumping to the latest version of futures-channel, 0.31.0, ran all the tests described in the contribution guide, and everything builds successfully and passes. I can make a PR if you'd like.

That would be great!

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

2 participants