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

Don't build driver for chrono/json/uuid/time/etc unless explicitly asked #328

Merged
merged 1 commit into from
May 12, 2022

Conversation

marti4d
Copy link
Contributor

@marti4d marti4d commented May 11, 2022

Cargo.toml files can use the "?" operator in their sub-dependencies to avoid
building the main dependency unless it is explicitly enabled by another feature

This uses that operator to avoid building the driver crate for
chrono/json/uuid/time/etc unless the driver crate is already enabled
explicitly

Fixes #327

PR Info

Fixes

  • The driver will no longer be built unless explicitly needed

Breaking Changes

  • It's possible that it may break downstream code that relied on that behavior

Cargo.toml files can use the "?" operator in their sub-dependencies to avoid
building the main dependency unless it is explicitly enabled by another feature

This uses that operator to avoid building the driver crate for
chrono/json/uuid/time/etc unless the driver crate is already enabled
explicitly

Fixes SeaQL#327
Copy link
Member

@billy1624 billy1624 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @marti4d, thanks for the contributions! Good use of the new cargo feature.

Btw this means user have to upgrade their Rust to at least 1.60 to compile SeaQuery? But I guess it's not an issue.

@tyt2y3 tyt2y3 merged commit 58e11cc into SeaQL:master May 12, 2022
@tyt2y3
Copy link
Member

tyt2y3 commented May 12, 2022

This is GREAT

@marti4d marti4d deleted the optional_driver branch May 12, 2022 18:53
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.

Don't unconditionally build driver when chrono/json/time/uuid/etc are enabled
3 participants