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

sqlx without default-features puts unnecessary database crates in my Cargo.lock #2579

Closed
djc opened this issue Jul 4, 2023 · 2 comments
Closed
Labels

Comments

@djc
Copy link
Contributor

djc commented Jul 4, 2023

Bug Description

I use sqlx with Postgres support, and don't need MySQL or SQLite support. Yet, when I add sqlx 0.7 as a dependency with default-features = false, features = ["chrono", "ipnetwork", "json", "macros", "migrate", "postgres", "runtime-tokio-rustls"] I still end up with sqlx-mysql and sqlx-sqlite in my Cargo.lock file. I don't think this should be the case -- it certainly didn't happen with sqlx 0.6 (even though I previously didn't even have default-features = false).

Info

  • SQLx version: 0.7.0
  • SQLx features enabled: ["chrono", "ipnetwork", "json", "macros", "migrate", "postgres", "runtime-tokio-rustls"]
  • Database server and version: should be irrelevant? (Postgres 14)
  • Operating system: macOS
  • rustc --version: rustc 1.70.0 (90c541806 2023-05-31)
@djc djc added the bug label Jul 4, 2023
@djc djc changed the title sqlx without default-features still pulls in unwanted database crates sqlx without default-features puts unnecessary database crates in my Cargo.lock Jul 4, 2023
@djc
Copy link
Contributor Author

djc commented Jul 4, 2023

Maybe this is an artifact of how weak dependencies work? These crates don't seem to result in artifacts in target/debug/deps.

@djc
Copy link
Contributor Author

djc commented Jul 4, 2023

Okay, yeah, this is rust-lang/cargo#10801.

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

1 participant