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

Disable linking to libsqlite3 when default features are disabled and sqlite is not a feature. #3301

Closed
matthiasdebernardini opened this issue Jun 19, 2024 · 1 comment
Labels

Comments

@matthiasdebernardini
Copy link

Bug Description

using sqlx (with default features disabled) and rusqlite in different crates that are in the same workspace causes their lib-sqlite3 dependency to clash.

I want to have my workspace build, but I can't unless I downgrade rusqlite to a version that's compatible with the version that sqlx links to. It should not try to look for libsqlite in the system if the features are disabled and I am only using postgres.

The reason I am not using sqlite from sqlx is because we want to offer to our users both a non-async way (rusqlite) and an async way (sqlx) to store their data.

I made an discussion here but after some consideration I don't think that that sqlite3 should be enabled when default features are disabled.

I also read the documentation here https://github.com/launchbadge/sqlx/blob/main/sqlx-sqlite/src/lib.rs but this doesn't fix my problem because we are building in a workspace that has crates and binaries. So I think the resolver works differently.

Info

  • SQLx version: 0.7.4
  • SQLx features enabled: sqlx = { version = "0.7.4", features = ["runtime-tokio-rustls", "postgres", "json", "chrono", "uuid"], default-features = false}
  • Database server and version: libsqlite-3
  • Operating system: macos 14.5
  • rustc --version: rustc 1.78.0 (9b00956e5 2024-04-29)
@abonander
Copy link
Collaborator

This is a Cargo bug, please see #3211

@abonander abonander closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants