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

remove sqlx runtime features from the library #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

charlesvdv
Copy link

According to the cargo book (source):

When a dependency is used by multiple packages, Cargo will use the union of all features enabled on that dependency when building it. This helps ensure that only a single copy of the dependency is used. See the features section of the resolver documentation for more details.

So, the library should actually not force a sqlx runtime to the end-user. The library should let the user decide which runtime to enable and cargo will unify everything by itself.

This is obviously not backward compatible with the current release so I guess a 0.5.0 might be required. I just not sure if I should include the bump of version in my PR :)

According to the cargo book
([source](https://doc.rust-lang.org/cargo/reference/features.html#feature-unification)):

> When a dependency is used by multiple packages, Cargo will use the union of all features enabled on that dependency when building it. This helps ensure that only a single copy of the dependency is used. See the features section of the resolver documentation for more details.

So, the library should not force a sqlx runtime to the end-user. The
library should let the user decide which runtime to enable and cargo
will unified the features by itself.
@94bryanr
Copy link

+1 on this PR.
Unable to use this package with the runtime dependencies.

Also +1 on the idea to move to a v0.5 and update crates.io since the current v0.4 release depends on outdated sqlx version 0.5.13.

@uduerholz
Copy link

Any chance to merge this pull request and publish it on crates.io? This would be really helpful.

@charlesvdv
Copy link
Author

FYI - as a workaround, you can use default-features = false (source) as a workaround for now. This will avoid the library to pull async-std.

However, I still think this PR deserve to be merged to avoid any confusion.

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.

3 participants