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

sea-query-binder links to sqlite3 conflict #823

Open
mattrighetti opened this issue Oct 4, 2024 · 1 comment
Open

sea-query-binder links to sqlite3 conflict #823

mattrighetti opened this issue Oct 4, 2024 · 1 comment

Comments

@mattrighetti
Copy link

This seems to be broken:

# NOTE: if you are copying this example into your own project, use the following line instead:
# sea-query = { version = "0" }
# sea-query-binder = { version = "0", features = [...] }

I've tested this within the examples/sqlx_example folder with the following Cargo.toml

[workspace]
# A separate workspace

[package]
name = "sea-query-sqlx-sqlite-example"
version = "0.1.0"
edition = "2021"
publish = false

[dependencies]
chrono = { version = "0.4", default-features = false, features = ["clock"] }
time = { version = "0.3.36", features = ["macros"] }
uuid = { version = "1", features = ["serde", "v4"] }
serde_json = "1"
async-std = { version = "1.8", features = [ "attributes" ] }
sqlx = "0.8"
sea-query = { version = "0" }
sea-query-binder = { version = "0", features = [
    "sqlx-sqlite",
    "with-chrono",
    "with-json",
    "with-uuid",
    "with-time",
    "runtime-async-std-native-tls",
] }

file and I get this error

$ cargo build
error: failed to select a version for `sea-query-binder`.
    ... required by package `sea-query-sqlx-sqlite-example v0.1.0 (/Users/mattrighetti/Developer/sea-query/examples/sqlx_sqlite)`
versions that meet the requirements `^0` are: 0.6.0, 0.5.0, 0.4.0, 0.3.1, 0.3.0, 0.2.2, 0.2.1, 0.2.0, 0.1.0

the package `sea-query-binder` links to the native library `sqlite3`, but it conflicts with a previous package which links to `sqlite3` as well:
package `sqlx v0.8.0`
    ... which satisfies dependency `sqlx = "^0.8"` of package `sea-query-sqlx-sqlite-example v0.1.0 (/Users/mattrighetti/Developer/sea-query/examples/sqlx_sqlite)`
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.

the package `sea-query-sqlx-sqlite-example` depends on `sea-query-binder`, with features: `runtime-async-std-native-tls` but `sea-query-binder` does not have these features.


failed to select a version for `sea-query-binder` which could resolve this conflict

I've tried on a different arch as well but the issue persists.

@mattrighetti
Copy link
Author

#669 (comment) seems related

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

No branches or pull requests

1 participant