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

fix(macros): only enable chrono when time is disabled #2697

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

saiintbrisson
Copy link
Contributor

Replicates the same approach done by the MySQL compatibility layer and only enables chrono types
if time is disabled.

I expect this to close #2689.

@saiintbrisson
Copy link
Contributor Author

saiintbrisson commented Sep 14, 2023

@abonander sorry for the ping. There were more complaints of this happening on #2689, and given the way Cargo manages features, this is probably not so uncommon. I guess this is why crates like tokio-postgres have the with- prefix on features.

@abonander
Copy link
Collaborator

abonander commented Oct 12, 2023

This is unfortunately a breaking change for people who have already worked around the problem by using chrono locally. I'll accept the PR if only to make the behavior consistent between databases but it will have to wait for the next major release either way.

And really, it just means chrono users will run into the exact same issue if a dependency enables time. It's not a real solution.

What we really need is a way to specify which crate to use outside of Cargo features, like perhaps with #121

@abonander abonander merged commit f316b0d into launchbadge:main Mar 12, 2024
58 checks passed
abonander added a commit that referenced this pull request Jul 23, 2024
jrasanen pushed a commit to jrasanen/sqlx that referenced this pull request Oct 14, 2024
jrasanen pushed a commit to jrasanen/sqlx that referenced this pull request Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sqlx uses chrono instead of time
2 participants