Bug Description
SQLx doesn't seem to play nicely with rusqlite even when not using the sqlite feature.
I'd expect to be able to use rusqlite instead of the sqlx 'sqlite' (for various reasons unrelated to whether it is better or not).
Minimal Reproduction
Demonstration:
- Clone the repo: https://github.com/BSteffaniak/sqlx-demo
cargo build
- Notice that it succeeds
- Uncomment the commented out the sqlx dependency version that has the
chrono feature enabled in the Cargo.toml
cargo build
- Notice that now it fails with an error message resembling the following:
error: failed to select a version for libsqlite3-sys.
... required by package sqlx-sqlite v0.8.0
... which satisfies dependency sqlx-sqlite = "=0.8.0" of package sqlx v0.8.0
... which satisfies dependency sqlx = "^0.8.0" (locked to 0.8.0) of package sqlx-demo v0.1.0 (/home/bsteffaniak/GitHub/Sqlx-demo)
versions that meet the requirements ^0.28.0 are: 0.28.0
the package libsqlite3-sys links to the native library sqlite3, but it conflicts with a previous package which links to sqlite3 as well:
package libsqlite3-sys v0.30.0
... which satisfies dependency libsqlite3-sys = "^0.30.0" (locked to 0.30.0) of package rusqlite v0.32.0
... which satisfies dependency rusqlite = "^0.32.0" (locked to 0.32.0) of package sqlx-demo v0.1.0 (/home/bsteffaniak/GitHub/Sqlx-demo)
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links = "sqlite3" value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.
failed to select a version for libsqlite3-sys which could resolve this conflict
Am I understanding something incorrectly about how nested dependencies should work?
Thanks!
Info
- SQLx version: 0.8.0
- SQLx features enabled: "chrono"
- Database server and version: postgres 0.8.0
- Operating system: Debian
rustc --version: rustc 1.79.0 (129f3b996 2024-06-10)
Bug Description
SQLx doesn't seem to play nicely with rusqlite even when not using the sqlite feature.
I'd expect to be able to use rusqlite instead of the sqlx 'sqlite' (for various reasons unrelated to whether it is better or not).
Minimal Reproduction
Demonstration:
cargo buildchronofeature enabled in theCargo.tomlcargo buildAm I understanding something incorrectly about how nested dependencies should work?
Thanks!
Info
rustc --version: rustc 1.79.0 (129f3b996 2024-06-10)