Closed bonsairobo closed 6 months ago
Showing up in the Cargo.lock
doesn't mean they're actually getting compiled
This is likely the same as #2964 which appears to be a result of the following Cargo bug: https://github.com/rust-lang/cargo/issues/10801#issuecomment-1874741198
@abonander
Showing up in the Cargo.lock doesn't mean they're actually getting compiled
Interesting! I guess I'm not worried about this then.
This is likely the same as https://github.com/launchbadge/sqlx/issues/2964
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.76