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
Running into an error where cargo thinks that sqlx has the sqlite feature enabled when I don't. Looking at the Sqlx's Cargo.toml, enabling chrono, time, uuid shouldn't enable sqlx-sqlite but they do, according to cargo, causing a blocking error on our side. The only workaround at the moment is to fork sqlx and remove references to sqlite as we can't update the dependency in the sqlsync crate.
error: failed to select a version for `libsqlite3-sys`.
... required by package `sqlx-sqlite v0.7.3`
... which satisfies dependency `sqlx-sqlite = "=0.7.3"` (locked to 0.7.3) of package `sqlx v0.7.3`
... which satisfies dependency `sqlx = "^0.7.3"` (locked to 0.7.3) of package `rust-lang-issue-10801 v0.1.0 (/Users/matthewgapp/code/scratchpad/rust-lang-issue-10801)`
versions that meet the requirements `^0.27.0` (locked to 0.27.0) are: 0.27.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.26.0 (https://github.com/trevyn/rusqlite?branch=wasm32-unknown-unknown#463090d3)`
... which satisfies git dependency `libsqlite3-sys` of package `sqlsync v0.2.0 (https://github.com/matthewgapp/sqlsync#c34cb11f)`
... which satisfies git dependency `sqlsync` of package `rust-lang-issue-10801 v0.1.0 (/Users/matthewgapp/code/scratchpad/rust-lang-issue-10801)`
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 ='libsqlite3-sys' 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
I also commented on an existing cargo bug that might be the root cause: rust-lang/cargo#10801 (comment). Would be great to know if perhaps it's a configuration issue on the SQLx side of things, though.
Place into a new cargo project and run cargo build to see the error. Alternatively, you can clone this example repo: https://github.com/matthewgapp/rust-lang-issue-10801. You'll be able to reproduce the below error. Note that while the sqlsync crate does depend on sqlite the sqlx crate shouldn't depend on sqlite (note the weak references). But cargo thinks it does.
Info
SQLx version: 0.7.3
SQLx features enabled: ["runtime-tokio-rustls", "postgres", "chrono"]
Database server and version: N/A
Operating system: MacOS
rustc --version: 1.75
The text was updated successfully, but these errors were encountered:
Bug Description
Running into an error where cargo thinks that sqlx has the sqlite feature enabled when I don't. Looking at the Sqlx's Cargo.toml, enabling
chrono
,time
,uuid
shouldn't enablesqlx-sqlite
but they do, according to cargo, causing a blocking error on our side. The only workaround at the moment is to fork sqlx and remove references to sqlite as we can't update the dependency in the sqlsync crate.I also commented on an existing cargo bug that might be the root cause: rust-lang/cargo#10801 (comment). Would be great to know if perhaps it's a configuration issue on the SQLx side of things, though.
Minimal Reproduction
The offending cargo toml has these dependencies:
Place into a new cargo project and run
cargo build
to see the error. Alternatively, you can clone this example repo: https://github.com/matthewgapp/rust-lang-issue-10801. You'll be able to reproduce the below error. Note that while the sqlsync crate does depend on sqlite the sqlx crate shouldn't depend on sqlite (note the weak references). But cargo thinks it does.Info
0.7.3
N/A
MacOS
rustc --version
:1.75
The text was updated successfully, but these errors were encountered: