Skip to content

Conversation

@robertbastian
Copy link
Member

@robertbastian robertbastian commented Oct 21, 2025

#7010

Adds DateError::MonthCodeNotInCalendar, DateError::MonthCodeNotInYear, docs, and flattens DateFromFieldsError::Range

@robertbastian robertbastian force-pushed the errs branch 2 times, most recently from 310e2bc to d31c33f Compare October 21, 2025 13:12
@robertbastian robertbastian marked this pull request as ready for review October 21, 2025 13:12
Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

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

I'm not aligned on this, as discussed in the issue.

@robertbastian robertbastian force-pushed the errs branch 3 times, most recently from bff797b to 6f2426d Compare October 22, 2025 10:00
@robertbastian robertbastian force-pushed the errs branch 2 times, most recently from c62e8b3 to 5b17987 Compare November 7, 2025 23:22
@Manishearth
Copy link
Member

As it stands this is a breaking change, yes?

@robertbastian
Copy link
Member Author

no

@Manishearth
Copy link
Member

Manishearth commented Nov 10, 2025

Ah, I see, UnknownMonthCode is still around. There is a little bit of concern around splitting the error variants but I don't really think matching on these variants is that common.

I like this. I'm pretty ambivalent on the "nested RangeError or struct variant" thing, our design here has some mistakes but overall this is an extremely minor aspect of the API.

@sffc
Copy link
Member

sffc commented Nov 10, 2025

I'm against adding new variants to DateError if it causes existing call sites with non-exhaustive matching on error variants to start falling into the catchall variant.

And my position on the nested RangeError hasn't changed since last discussed in #7010.

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.

3 participants