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

Crate depends on async_std for seemingly no reason #24

Open
CyrusAlbright opened this issue Jun 29, 2021 · 3 comments
Open

Crate depends on async_std for seemingly no reason #24

CyrusAlbright opened this issue Jun 29, 2021 · 3 comments

Comments

@CyrusAlbright
Copy link

Trying to integrate this crate into a project using Warp which is built on Tokio, so I'm using the sqlx crate with the runtime-tokio-native-tls option, but in this crate, the first line of the features in the Cargo.toml file is default = ["native-tls"] which leads to further down the features list native-tls = ["sqlx/runtime-async-std-native-tls"], so it's using a conflicting sqlx runtime.

It looks like recent efforts were made on this crate to move away from a dependency on async-std, so I would appreciate if this could be fixed. To keep current projects working, it should be possible to keep the existing defaults and have a feature to enable using the Tokio runtime.

@CyrusAlbright
Copy link
Author

I think it would need a build script because of how SQLx's features system works, so I'll see if I can make one and have a pull request up. Ideally I'll not have to change much.

@CyrusAlbright
Copy link
Author

CyrusAlbright commented Jun 29, 2021

Nevermind. Build scripts execute after everything else has been compiled. I guess there's nothing to do here other than add SQLx's own features system to this crate. I'll get a PR up as soon as I can. Unfortunately I think this will have to break current compatibility, so best to make it a new version.

@CyrusAlbright
Copy link
Author

Alright, I've made a pull request.

#25

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

No branches or pull requests

1 participant