Skip to content

Conversation

@eemeli
Copy link
Collaborator

@eemeli eemeli commented Oct 10, 2024

This is a continuation for the changes of #728, defining a fallback value explicitly as a resolved value, and rephrasing the parts of the spec that refer to resolution failures to instead test for whether a resolved value is a fallback value.

@eemeli eemeli added formatting Issue pertains to the formatting section of the spec LDML46.1 labels Oct 10, 2024
Co-authored-by: Addison Phillips <[email protected]>
but it always resolves to some mapping of string identifiers to values.
The result of _option resolution_ MUST be a (possibly empty) mapping
of string identifiers to values;
that is, errors MAY be emitted, but such errors MUST NOT be fatal.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the first mention I've noticed in the spec of a non-fatal error, i.e. a warning. If Bad Option is sometimes a fatal error and sometimes a warning, it seems like the spec needs some more language to clarify what implementations should do with it. Or if it's meant to always be a warning, maybe https://github.com/unicode-org/message-format-wg/blob/main/spec/errors.md should say something about that?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought: from the perspective of an implementation can only signal errors or return usable output, but not both, I'm reading this as saying that the implementation can't signal a Bad Option error. Which is fine, since it's a "MAY".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good insight. It means that certain classes of errors will be silent in ICU4C. FWIW, ICU4J probably has similar issues. You can't throw Bad Option without being fatal. Logging the error is about the best one can do.

Co-authored-by: Tim Chevalier <[email protected]>
aphillips added a commit that referenced this pull request Oct 28, 2024
This addresses concerns raised in #903 

- define `option resolution` as a term
- require that option order is not significant

I was tempted to define the term `resolved options`, but held back.
aphillips added a commit that referenced this pull request Oct 28, 2024
This addresses concerns raised in #903 

- define `option resolution` as a term
- require that option order is not significant

I was tempted to define the term `resolved options`, but held back.
@eemeli
Copy link
Collaborator Author

eemeli commented Nov 12, 2024

Updated, as per today's discussions. The fallback variable name is now the last one, and it may be a local variable name.

@eemeli eemeli requested a review from macchiati November 14, 2024 01:15
Copy link
Member

@aphillips aphillips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicks, Englische-type comments, some observations.

@aphillips
Copy link
Member

@catamorphism I'm ready to merge this, but checking with you before I do, since you previously had a comment.

@aphillips
Copy link
Member

Seeing no reply, I'm merging this. File issues as needed.

@aphillips aphillips merged commit f3344b5 into main Nov 16, 2024
2 checks passed
@aphillips aphillips deleted the fix-fallback-also branch November 16, 2024 15:03
eemeli added a commit to messageformat/messageformat that referenced this pull request Nov 19, 2024
@eemeli eemeli added this to the LDML 46.1 milestone Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

formatting Issue pertains to the formatting section of the spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants