Raise libsqlite3-sys dependency from 0.30 to 0.31#3844
Raise libsqlite3-sys dependency from 0.30 to 0.31#3844dtolnay wants to merge 2 commits intolaunchbadge:mainfrom
Conversation
This is required by bindgen 0.71, which is used by libsqlite3-sys 0.31.
error: extern block cannot be declared unsafe
--> target/debug/build/libsqlite3-sys-3da8b75ff8e55f52/out/bindgen.rs:521:1
|
521 | unsafe extern "C" {
| ^^^^^^
|
@dtolnay would it be acceptable to close this in favor of a bigger bump to 0.34/0.35: #3922 (comment) |
|
With #3922 there is still no way to use a recent version of My preferred policy would be if sqlx could commit to hitting every libsqlite3-sys release, not skipping ahead more than one version at a time. For example you might publish sqlx 0.9.0 compatible with libsqlite3-sys 0.31, sqlx 0.9.1 compatible with libsqlite3-sys 0.32, sqlx 0.9.2 compatible with libsqlite3-sys 0.33, etc. Even if those are published on the same day within minutes of each other. This allows codebases constrained on libsqlite3-sys version (such as by |
|
What if we started using version ranges instead? There's generally never any changes that break our usage. Why does |
|
In my experience range dependencies have been universally a bad idea in every project that has tried them. It leads to dependencies that flap unpredictably and uncontrollably between different versions when touching unrelated dependencies and when using That said, I don't think my experience covers a version range for a dependency that uses |
|
Yeah, I think it should work fine because it's exactly what Diesel does: https://github.com/diesel-rs/diesel/blob/cdf7c51c35da7ebc6fb12e71857bfba8487c20cd/diesel/Cargo.toml#L53 |
|
Opened #3928 |
This makes it possible to use sqlx and the most recent versions of the
cargocrate in the same dependency graph. Cargo depends on rusqlite 0.33 which uses libsqlite3-sys 0.31. Without this PR, this dependency graph doesn't work.Is this a breaking change?
The libsqlite3-sys update: no, previous precedent is that these are semver-exempt and anyone using libsqlite3-sys through some other dependency needs to have pinned their sqlx version and be updating in lockstep.
sqlx/CHANGELOG.md
Lines 888 to 890 in 91d26ba
However, for this specific update, libsqlite3-sys requires a version of bindgen that only supports Rust 1.82+, and sqlx considers this a breaking change.
sqlx/FAQ.md
Lines 23 to 24 in 91d26ba
If a new major version of sqlx is not imminent, I am still interested in libsqlite3-sys 0.31 in sqlx 0.8 and can make it not a breaking change by improving bindgen to generate Rust 1.78-compatible code when run by a toolchain older than 1.82.