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

Enabling migrate feature also adds mysql #3207

Closed
rafaelGuerreiro opened this issue Apr 19, 2024 · 2 comments
Closed

Enabling migrate feature also adds mysql #3207

rafaelGuerreiro opened this issue Apr 19, 2024 · 2 comments
Labels
bug:rust Indicates a bug or regression in Rust bug

Comments

@rafaelGuerreiro
Copy link
Contributor

rafaelGuerreiro commented Apr 19, 2024

Bug Description

I'm not sure this bug belongs to sqlx or cargo/rust.

When using sqlx = { version = "0.7.4", default-features = false, features = ["postgres"]}, only sqlx, sqlx-core, sqlx-macros, and sqlx-postgres are loaded.

But when I add "migrate", or "uuid", or "chrono", I also see "sqlx-mysql", and "sqlx-sqlite" in my Cargo.lock file.

Minimal Reproduction

Cargo.toml

[package]
name = "test-sqlx"
version = "0.1.0"
edition = "2021"

[dependencies]
sqlx = { version = "0.7.4", default-features = false, features = ["postgres"]}

Results in this Cargo.lock

[[package]]
name = "sqlx"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa"
dependencies = [
 "sqlx-core",
 "sqlx-macros",
 "sqlx-postgres",
]

Cargo.toml

[package]
name = "test-sqlx"
version = "0.1.0"
edition = "2021"

[dependencies]
sqlx = { version = "0.7.4", default-features = false, features = ["postgres", "migrate"]}

Results in this Cargo.lock

[[package]]
name = "sqlx"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa"
dependencies = [
 "sqlx-core",
 "sqlx-macros",
 "sqlx-mysql",
 "sqlx-postgres",
 "sqlx-sqlite",
]

Info

  • SQLx version: 0.7.4
  • SQLx features enabled: postgres, migrate
  • Database server and version: Postgres (MySQL / Postgres / SQLite <x.y.z>)
  • Operating system: MacOS 14.4.1
  • rustc --version: rustc 1.77.2 (25ef9e3d8 2024-04-09)
@brendanhay
Copy link

This is the same issue as #2964, caused by rust-lang/cargo#10801.

@abonander
Copy link
Collaborator

Using #3211 to aggregate these issues.

@abonander abonander closed this as not planned Won't fix, can't repro, duplicate, stale Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:rust Indicates a bug or regression in Rust bug
Projects
None yet
Development

No branches or pull requests

3 participants