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

Breaking change in chrono 0.4.32 (Accepted MAX date changed) #1389

Closed
weiznich opened this issue Jan 26, 2024 · 4 comments
Closed

Breaking change in chrono 0.4.32 (Accepted MAX date changed) #1389

weiznich opened this issue Jan 26, 2024 · 4 comments

Comments

@weiznich
Copy link

We have failing tests in diesel due to a breaking change in a chrono 0.4.32

I was able to minize it to the following code:

use chrono::NaiveDate;

fn main() {
    let max = NaiveDate::MAX;
    dbg!(max);

    let d = NaiveDate::from_ymd_opt(262143, 12, 31);
    assert!(d.is_some());
}

This code compiles and runs without panic using chrono < 0.4.32 and triggers the assert with 0.4.32 and 0.4.33.
Interestingly NaiveDate::MAX is equal to the provided date, as shown by the dbg! call before, so it's not clear what's now the actual supported maximum date.

This is similar to #1382 but about a change in the supported max date instead.

weiznich added a commit to colem213/diesel that referenced this issue Jan 26, 2024
@djc
Copy link
Contributor

djc commented Jan 26, 2024

So this is likely from #1317, but it looks like we may have made things internally inconsistent. @pitdicker are you able to look into this one?

@pitdicker
Copy link
Collaborator

Yes, this is #1317.

@djc I'd like edit the release notes to put the changes into sections like changed, fixed etc, and call out these changes to the accepted range of NaiveDate and Duration. I'm not sure how to best do so and make it reviewable. Shall I give it a shot and you can then edit again if needed?

@djc
Copy link
Contributor

djc commented Jan 26, 2024

@djc I'd like edit the release notes to put the changes into sections like changed, fixed etc, and call out these changes to the accepted range of NaiveDate and Duration. I'm not sure how to best do so and make it reviewable. Shall I give it a shot and you can then edit again if needed?

Sounds good!

@pitdicker
Copy link
Collaborator

Updated the release notes https://github.com/chronotope/chrono/releases/tag/v0.4.32.

@pitdicker pitdicker closed this as not planned Won't fix, can't repro, duplicate, stale Mar 8, 2024
1Dragoon pushed a commit to 1Dragoon/diesel that referenced this issue Mar 10, 2024
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

3 participants