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

Loosen concurrent-queue dependency #142

Closed
CodingAnarchy opened this issue Jun 13, 2024 · 2 comments
Closed

Loosen concurrent-queue dependency #142

CodingAnarchy opened this issue Jun 13, 2024 · 2 comments

Comments

@CodingAnarchy
Copy link

CodingAnarchy commented Jun 13, 2024

We ran into an issue with this transitive dependency because event-listener requires 2.4.0 for concurrent-queue, but when we added async-channel as another transitive dependency (which depends on 2.5), Cargo resolved the wrong version when compiling the async-channel dependency.

error[E0432]: unresolved import `concurrent_queue::ForcePushError`
  --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-channel-2.3.0/src/lib.rs:50:41
   |
50 | use concurrent_queue::{ConcurrentQueue, ForcePushError, PopError, PushError};
   |                                         ^^^^^^^^^^^^^^ no `ForcePushError` in the root

error[E0599]: no method named `force_push` found for struct `ConcurrentQueue` in the current scope
   --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-channel-2.3.0/src/lib.rs:313:34
    |
313 |         match self.channel.queue.force_push(msg) {
    |                                  ^^^^^^^^^^ method not found in `ConcurrentQueue<T>`

Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `async-channel` (lib) due to 2 previous errors

We managed to work around this by explciitly specifying concurrent-queue = "2.5" in our Cargo.toml file directly, but it would also help if the dependency here was less strict and allowed for 2.x versions. I know that #109 proposes removing that dependency entirely (which would be fantastic), but if a looser dependency check makes sense, I can open a much quicker PR to accomplish that.

@notgull
Copy link
Member

notgull commented Jun 15, 2024

The current dependency is:

concurrent-queue = { version = "2.4.0", default-features = false }

This should allow for v2.5 as well. Could you consider investigating your Cargo.lock file?

@CodingAnarchy
Copy link
Author

I've looked into this more, and it seems like the issue was that async-channel itself was set with an incompatible version requirement, so the fact that 2.4.0 was already in the lock file meant no upgrade was done.

They fixed this in a patch release so we just upgraded there. Apologies for the noise.

@CodingAnarchy CodingAnarchy closed this as not planned Won't fix, can't repro, duplicate, stale Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants