Skip to content
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

[BUGFIX][deps] Explicitly set patched version of sqlx #6047

Merged
merged 1 commit into from
Nov 11, 2022

Conversation

amnn
Copy link
Contributor

@amnn amnn commented Nov 11, 2022

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 MystenLabs#5887
@amnn amnn requested a review from huitseeker November 11, 2022 17:31
@amnn amnn self-assigned this Nov 11, 2022
@amnn amnn enabled auto-merge (squash) November 11, 2022 17:34
Copy link
Contributor

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fine to me!

@amnn amnn merged commit f969850 into MystenLabs:main Nov 11, 2022
@amnn amnn deleted the fix-sqlite-version branch February 9, 2023 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libsqlite3-sys version conflict in Rust SDK
2 participants