-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Conversation
There was a problem hiding this 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.
spec/formatting.md
Outdated
- If the _option_'s _identifier_ already exists in the resolved mapping of _options_, | ||
emit a Duplicate Option Name error. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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>
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.