-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add Duplicate Variant error #853
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 start.
Co-authored-by: Addison Phillips <addison@unicode.org>
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.
Seems reasonable enough
@@ -369,6 +369,9 @@ satisfied: | |||
- At least one _variant_ MUST exist whose _keys_ are all equal to the "catch-all" key `*`. | |||
- Each _selector_ MUST have an _annotation_, | |||
or contain a _variable_ that directly or indirectly references a _declaration_ with an _annotation_. | |||
- Each _variant_ MUST use a list of _keys_ that is unique from that | |||
of all other _variants_ in the _message_. | |||
_Literal_ _keys_ are compared by their contents, not their syntactical appearance. |
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.
_Literal_ _keys_ are compared by their contents, not their syntactical appearance. | |
_Literal_ _keys_ are compared by their contents, not their syntactical appearance. | |
Keys are considered the same if they are canonically equivalent. | |
See [Canonical and Compatibility Equivalence](https://unicode.org/reports/tr15/#Canon_Compat_Equivalence) |
Unicode conformance allows (and encourages) implementations to normalize canonically equivalent characters. This is a very common operation when text is input and/or processed. Without this step, there are cases where one implementation would return this error and another would not.
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.
Canonical equivalence looks like a pretty good idea, but we should apply it to all the places where we do such comparisons. But I think that's a separate change from this PR that I explicitly left out:
This does not address the questions about identifier normalization also raised in the parent issue; that should be done in a separate PR.
Makes sense
…On Wed, Aug 7, 2024, 12:15 Eemeli Aro ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In spec/syntax.md
<#853 (comment)>
:
> @@ -369,6 +369,9 @@ satisfied:
- At least one _variant_ MUST exist whose _keys_ are all equal to the "catch-all" key `*`.
- Each _selector_ MUST have an _annotation_,
or contain a _variable_ that directly or indirectly references a _declaration_ with an _annotation_.
+- Each _variant_ MUST use a list of _keys_ that is unique from that
+ of all other _variants_ in the _message_.
+ _Literal_ _keys_ are compared by their contents, not their syntactical appearance.
Canonical equivalence looks like a pretty good idea, but we should apply
it to all the places where we do such comparisons. But I think that's a
separate change from this PR that I explicitly left out:
This does not address the questions about identifier normalization also
raised in the parent issue; that should be done in a separate PR.
—
Reply to this email directly, view it on GitHub
<#853 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACJLEMAN5YTSEHS2YVK3CITZQJW6BAVCNFSM6AAAAABMARH7CSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDEMRVHE4TSNJUHE>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
See #847 for context and discussion.
This does not address the questions about identifier normalization also raised in the parent issue; that should be done in a separate PR.