-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Building SQLx with -Z features fails #526
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
Comments
Okay, I think I've found the pattern: This happens whenever the async-std runtime is enabled (none of the other runtimes have this issue) and at least some additional features are used ( I think what must be happening here is that sqlx is using some feature(s) without activating its feature flag, but with the old feature resolver they are enabled through a build or dev dependency. The actix and tokio runtimes apparently also enable this feaure, but the async-std runtime does not. |
Error:
|
this almost looks like a bug in Cargo | doesn't satisfy `_: futures_util::SinkExt<_>`
| doesn't satisfy `_: futures_util::sink::Sink<_>`
|
= note: the method `send` exists but the following trait bounds were not satisfied:
`futures_channel::mpsc::Sender<std::result::Result<T, error::Error>>: futures_util::sink::Sink<_>`
which is required by `futures_channel::mpsc::Sender<std::result::Result<T, error::Error>>: futures_util::SinkExt<_>`
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
`use futures_util::sink::SinkExt;` and two versions of |
I dug a little bit. The impl of |
I guess one needs to build with
Seems plausible considering what you found and the fact the error is in sqlx-core but I haven't (so far) found a way of triggering it without telling cargo to build the main sqlx crate. |
This seems to still be happening, but with different errors. This time I'm not sure it's a Cargo issue. But if it is, should maybe mention it on the tracking issue for the new feature resolver (rust-lang/rfcs#2957) which is now in FCP. |
I can't reproduce this anymore, even by checking out an old version of SQLx. |
Here's what I've found fails:
cargo build -Z features=all
cargo build -Z features=all --no-default-features --features runtime-async-std,migrate
cargo build -Z features=all --no-default-features --features runtime-async-std,any
I haven't (yet) been able to surface this just compiling sqlx-core.
The text was updated successfully, but these errors were encountered: