Skip to content

Clarify that Duplicate Option Name is a data model error #577

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

Merged
merged 4 commits into from
Jan 15, 2024

Conversation

eemeli
Copy link
Collaborator

@eemeli eemeli commented Jan 1, 2024

I noticed during implementation that even though we define Duplicate Option Name as a data model error, we handle it as a formatting error. This should be clarified.

@eemeli eemeli added the specification Issue affects the specification label Jan 1, 2024
Copy link
Member

@aphillips aphillips left a comment

Choose a reason for hiding this comment

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

Good call out, I think. Some comments.

Comment on lines 217 to 218
- If the _option_'s _identifier_ already exists in the resolved mapping of _options_,
emit a Duplicate Option Name error.
Copy link
Member

Choose a reason for hiding this comment

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

Why remove this? An implementation might detect this during parsing (which, it sounds like, you're doing when populating the data model). But it might not (if it naively parses the message and doesn't evaluate options until formatting time). Does this directive do any harm?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because we don't do that for any of the data model errors, and keeping this here would create a requirement for throwing data model errors during formatting, rather than before.

We should probably move the syntax & data model error definitions out of formatting.md into their own doc, and make it clearer that a message must be validated against all of them before formatting.

Co-authored-by: Addison Phillips <addisonI18N@gmail.com>
Good callout

Co-authored-by: Eemeli Aro <eemeli@gmail.com>
@eemeli eemeli requested a review from aphillips January 15, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LDML45 LDML45 Release (Tech Preview) specification Issue affects the specification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants