-
-
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
[FEEDBACK] Resolution between input calendar and message calendar #963
Comments
(as individual contributor)
I don't agree. The option
You also noted:
Note that the |
The job, I would say only job, of a specification is to guarantee interoperability between implementations. It is not interoperable if one implementation throws an error and another doesn't in the same message |
MF2 specifically doesn't specify exactly what happens with each message in each locale, and also allows for implementations to limit what they support (locales, etc). So in that sense, it is not 'interoperable between implementations'. But it also can't be, not if we want it to be adopted broadly when the underlying systems don't have full access to all data necessary for implementing all functions. Personally, I think that it would be useful to have more information in the errors, and stipulate when they MUST/SHOULD/MAY/MUST NOT... be emitted. And add notion of a warning (signaling that the message was formatted meaningfully even though an option value couldn't be handled). For example we could have something like:
... |
@macchiati Note that some of the kinds of errors you mention are at a different level from what MF2 prescribes at the message level.
We don't forbid this. Error handling is reasonably diverse, such that it's hard to do things without making life difficult for some implementations. The dichotomy between function handler and MF2 implementation is also at play here. We literally have no idea of the universe of things that might go wrong in a function (especially when we get to custom functions!!) so we leave a lot of leeway for the function handler to blow up and have the MF2 implementation report out what happened. Most of what you're talking about here can reside at the function handler level (in the date/time functions, in the case of It also makes sense to push option validation down into the function handler or at least the glue layer between MF2 and the function itself. This allows the implementer of
We do, much of the time. Many types of error are obligatory and there are places where errors MUST NOT be emitted. If there are gaps in this where you think errors aren't sufficiently prescribed, we should fix that.
This is one super tricky, no? Almost all of our standards depend on locale-based fallbacks for locale and data selection. In a previous life, we emitted a warning when the fallback crossed a language boundary (that is, when the fallback for the language priority list |
In LDML 47, can we change the |
We agreed in 2025-01-13 that supporting the calendar option should be either SHOULD or MAY and not MUST. |
A bit more background on the Temporal design here... (cc @mihnita) There are several ways to construct a Temporal date:
In all of these, the calendar ends up as undefined or To specify a strong calendar, there are a number of options:
As far as java.time, if you explicitly construct a |
Sounds good. |
This is similar to #961, but about calendars.
There could be two sources for calendars: the input type being formatted, and the message string. (Actually, there is a third, the locale of the message formatter.)
The spec should be more clear about resolution when these are in conflict with one another.
As a reference point, in Temporal, we throw an exception if two of the calendars differ and they are not ISO-8601. For example:
The text was updated successfully, but these errors were encountered: