Clarify that Duplicate Option Name is a data model error#577
Clarify that Duplicate Option Name is a data model error#577aphillips merged 4 commits intounicode-org:mainfrom
Conversation
aphillips
left a comment
There was a problem hiding this comment.
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.
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.
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.