You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From one package in a project:
project/sub-postgres/src/lib.rs
pubuse sqlx::{self, postgres::PgPool};
...
project/sub-usepsql/src/lib.rs
use sub_postgres::sqlx::{self,PgPool};
...let foo = query!(...)
With sqlx 0.4 this worked just fine.
WIth sqlx 0.5 (because of 76326c6) This throws extensive errors if sqlx isn't also included in project/sub-usepsql/Cargo.toml
The text was updated successfully, but these errors were encountered:
That this worked on 0.4 was not intentional. Generally proc-macros are expected to work regardless of other items in the crate or module, and if the macros looked for sqlx (0.4 behaviour) instead of ::sqlx (0.5 behaviour), they would break if there was a local module named sqlx that doesn't re-export a bunch of stuff from the sqlx crate.
If you are annoyed by having to re-specify the version and features for your dependencies in multiple crates of your workspace, I suggest watching rust-lang/cargo#8415.
From one package in a project:
project/sub-postgres/src/lib.rs
project/sub-usepsql/src/lib.rs
With sqlx 0.4 this worked just fine.
WIth sqlx 0.5 (because of 76326c6) This throws extensive errors if sqlx isn't also included in
project/sub-usepsql/Cargo.toml
The text was updated successfully, but these errors were encountered: