-
Notifications
You must be signed in to change notification settings - Fork 11.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libsqlite3-sys version conflict in Rust SDK #5887
Comments
Yeah, I'm also facing the same issue. |
[dependencies]
|
Hey @stella3d, got a couple more reports of this issue -- this is going to be blocking anyone that uses the Rust SDK, so fairly urgent -- adding some tags to reflect that. |
Another observation from a report on Discord is that it seems to work fine if the Rust SDK is built from source, rather than pulled from crates.io, so this may be a matter of us needing to update our release on crates. |
Is this the commit that's causing all the pain? |
This seems to fix the issue index dd5dee1ab..c808758db 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -111,4 +111,4 @@ workspace-hack = { path = "crates/workspace-hack" }
# patch sqlx to a version using libsqlite3-sys v0.25.1 or later, see
# https://github.com/launchbadge/sqlx/pull/2176
[patch.crates-io]
-sqlx = { git="https://github.com/huitseeker/sqlx", branch="update_libsqlite3" }
+sqlx = { git="https://github.com/huitseeker/sqlx", rev="8fca76065a3a0c46989a4366875aa9b663703001" } |
So how should I solve this problem? |
Sui's dependency on `sqlx` needs to be overridden with a patched version that uses a more recent version of `libsqlite3-sys`. The previous approach used a `patch` configuration in the root `Cargo.toml`. This works for builds within this project, but seems to break for builds that originate from outside the workspace, but depend on one of the workspace crates. In this scenario, the patch doesn't apply on the dependency on `sqlx` in `sui-storage`, so it ends up conflicting with the dependency in `workspace-hack`. The most common example of this is someone depending on the Rust SDK (`sui-sdk`). This diff ditches the `patch` and sets the dependency override explicitly on `sui-storage`. Test Plan: Sui builds and runs: ``` sui$ cargo build sui$ cargo simtest sui$ cargo nextest run ``` Dependents on the Sui SDK build and run, e.g. following the instructions at https://docs.sui.io/build/rust-sdk succeeds. Closes MystenLabs#5887
Sui's dependency on `sqlx` needs to be overridden with a patched version that uses a more recent version of `libsqlite3-sys`. The previous approach used a `patch` configuration in the root `Cargo.toml`. This works for builds within this project, but seems to break for builds that originate from outside the workspace, but depend on one of the workspace crates. In this scenario, the patch doesn't apply on the dependency on `sqlx` in `sui-storage`, so it ends up conflicting with the dependency in `workspace-hack`. The most common example of this is someone depending on the Rust SDK (`sui-sdk`). This diff ditches the `patch` and sets the dependency override explicitly on `sui-storage`. Test Plan: Sui builds and runs: ``` sui$ cargo build sui$ cargo simtest sui$ cargo nextest run ``` Dependents on the Sui SDK build and run, e.g. following the instructions at https://docs.sui.io/build/rust-sdk succeeds. Closes #5887
Sui's dependency on `sqlx` needs to be overridden with a patched version that uses a more recent version of `libsqlite3-sys`. The previous approach used a `patch` configuration in the root `Cargo.toml`. This works for builds within this project, but seems to break for builds that originate from outside the workspace, but depend on one of the workspace crates. In this scenario, the patch doesn't apply on the dependency on `sqlx` in `sui-storage`, so it ends up conflicting with the dependency in `workspace-hack`. The most common example of this is someone depending on the Rust SDK (`sui-sdk`). This diff ditches the `patch` and sets the dependency override explicitly on `sui-storage`. Test Plan: Sui builds and runs: ``` sui$ cargo build sui$ cargo simtest sui$ cargo nextest run ``` Dependents on the Sui SDK build and run, e.g. following the instructions at https://docs.sui.io/build/rust-sdk succeeds. Closes #5887
The fix has hit |
Steps to Reproduce Issue
Follow this tutorial, add the sui-sdk crate in
Cargo.toml
fileThen run example code.
Compile Error
System Information
The text was updated successfully, but these errors were encountered: