async-sqlx-session icon indicating copy to clipboard operation
async-sqlx-session copied to clipboard

remove sqlx runtime features from the library

Open charlesvdv opened this issue 1 year ago • 3 comments

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 :)

charlesvdv avatar Apr 19 '23 16:04 charlesvdv

+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.

94bryanr avatar Apr 26 '23 01:04 94bryanr

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

uduerholz avatar Jun 12 '23 16:06 uduerholz

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.

charlesvdv avatar Jun 12 '23 18:06 charlesvdv