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
I am encountering unexpected behavior of the cargo features in this crate. I want to enable only the postgres and migrate features, but it seems to pull in all database features whenever migrate is enabled.
This is surprising because all of the database crates (sqlx-sqlite, etc) are optional and should only be enabled by their corresponding features. This is how the migrate feature is defined:
My understanding of the ? in a cargo manifest is that it should not enable the feature before the ?, and only enable the feature following the ? if the parent crate is already enabled somewhere else. The behavior I observe is not consistent with this.
To be fair, this might be a cargo bug. I can't really tell.
This was the original issue I was running into as well, except I've got rusqlite in my dep tree instead of sqlsync. Sorry I didn't manage to find it in my search. For now, I can live with a workaround where I just downgrade rusqlite so the libsqlite3-sys versions match up, even though I'm not even using sqlx for SQLite.
Feel free to close this issue as a duplicate of #2964 .
Bug Description
I am encountering unexpected behavior of the cargo features in this crate. I want to enable only the
postgres
andmigrate
features, but it seems to pull in all database features whenevermigrate
is enabled.This is surprising because all of the database crates (
sqlx-sqlite
, etc) are optional and should only be enabled by their corresponding features. This is how themigrate
feature is defined:My understanding of the
?
in a cargo manifest is that it should not enable the feature before the?
, and only enable the feature following the?
if the parent crate is already enabled somewhere else. The behavior I observe is not consistent with this.To be fair, this might be a
cargo
bug. I can't really tell.Minimal Reproduction
Expected output: empty
Actual output:
Info
migrate
rustc --version
: 1.76The text was updated successfully, but these errors were encountered: