-
-
Notifications
You must be signed in to change notification settings - Fork 36
[FEEDBACK] Limits of Digit Size Options #960
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
Comments
Given that the spec also includes message-format-wg/spec/registry.md Lines 690 to 693 in 849db9c
it's not clear to me what this feedback is about? |
I feel limits on these options should be more strict in general because it is a dereliction of duty for MF2 to allow a message that is supported in one implementation but rejected in another (without using implementation-specific namespaced options), but I'll leave it up to the WG to decide if this text, permitting engines to differ in the limits they impose, is acceptable to MF2. |
@sffc What change would you propose here? The goal would be to restrict the upper size of a digit size option's value without restricting numeric types supported by implementations. Note that we have limited the size to 99, while Note that the ABNF is a syntactic limit. We would probably change that syntax if we agree on a practical upper limit < 99.
This would not happen because the message will not be rejected. Exceeding
|
@aphillips explained to me that what this means is:
Since the error is non-fatal, you get GIGO-like behavior, so nothing actually breaks; you don't get data-driven exceptions, which is what I'm concerned about. |
2024-04-14 call: Need to allow clamping. |
Fixes #960 Per the discussion in the 2025-04-14 telecon, allow digit size options to be to clamped to an implementation-specific value.
* Allow clamping of digit size options Fixes #960 Per the discussion in the 2025-04-14 telecon, allow digit size options to be to clamped to an implementation-specific value. * Update spec/functions/number.md Co-authored-by: Eemeli Aro <[email protected]> * Address comments * Make clear ignorance and clamping behavior * Address Tim's action item --------- Co-authored-by: Eemeli Aro <[email protected]>
The Digit Size Options in registry.md say they use the following EBNF:
This appears to accept 0, 1, 2, ..., 9, 10, 11, ..., 98, 99.
However, ECMA-402 restricts the range of some of these integers to be less. For example, minimum and maximum significant digits and minimum integer digits are restricted to the range 1-21:
https://tc39.es/ecma402/#sec-setnfdigitoptions
The text was updated successfully, but these errors were encountered: