-
Notifications
You must be signed in to change notification settings - Fork 174
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
Provide a getter for the resolved options for the collator #4047
Provide a getter for the resolved options for the collator #4047
Conversation
It looks like CI wants the Diplomat wrapper to go into the same PR. I'm converting this to draft until it's been decided whether this should return |
Discuss with: |
In my prototype of icu_preferences I moved in the direction of a macro generating resolved options without @hsivonen are you opinionated in the other direction? |
I am not. That is, without |
I'll weigh in here. I think the input and output options should be separate structs. In ECMA-402, the input and output structs are sometimes not the same. For example, Intl.NumberFormat takes But more importantly, the semantics of resolved options are different. The required versus optional fields are not the same. For example, in Intl.NumberFormat, This would imply that the options should also be different structs across FFI. Ideally these FFI structs should also include optional fields, but that is blocked on rust-diplomat/diplomat#132. |
I have now made the FFI types distinct from each other even though the types are, for now, identical except for the name.
I have not duplicated the |
As discussed on 2023-11-09, we're happy with the direction of this PR. |
Blocked on #4326. It appears that |
Looks like merge conflicts show up faster than my cycle to check back here for the CI results. I'll merge main again. |
If/when this get re-approved, please push the landing button, too, so that this doesn't get out of sync with |
Fixes #3880
(Before merging, we should decide if we want the return type to be
CollatorOptions
of if we want aResolvedCollatorOptions
that doesn't wrap each field inOption
.)