Skip to content
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

ActiveLocale implementation is probably larger than it needs to be, not cross-platform, buggy #13483

Closed
bzbarsky-apple opened this issue Jan 12, 2022 · 0 comments · Fixed by #13633
Assignees
Labels
spec Mismatch between spec and implementation utility-cluster Work for Utility Clusters

Comments

@bzbarsky-apple
Copy link
Contributor

Problem

The ActiveLocale implementation from #13415 has the following problems:

  1. Lots of support code used that shouldn't be needed.
  2. Requires per-platform implementation for what should be cross-platform functionality.
  3. Does not implement the spec correctly. It's missing this bit:

An attempt to write a value to ActiveLocale that is not present in SupportedLocales SHALL result in a CONSTRAINT_ERROR error.

Proposed Solution

  1. Instead of implementing via configuration manager and attribute access override, use NVM attribute storage, which works on all platforms without requiring per-platform implementations.
  2. Use a PreAttributeChangedCallback that reads the SupportedLocales list to implement the spec's CONTRAINT_ERROR bit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec Mismatch between spec and implementation utility-cluster Work for Utility Clusters
Projects
None yet
2 participants