chakra-core / chakra-core/ChakraCore
libicu v78 formatting changes
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
The following Intl test started failing in MacOS ci likely to the new libicu `v78.1` (see https://github.com/chakra-core/ChakraCore/pull/7038#issuecomment-3591893684)
https://github.com/chakra-core/ChakraCore/blob/2dba810c925eb366e44a1f7d7a5b2e289e2f8510/test/Intl/DateTimeFormat.js#L207-L208
[ci-linux.txt](https://github.com/user-attachments/files/23835768/ci-linux.txt)
[ci-macos.txt](https://github.com/user-attachments/files/23835769/ci-macos.txt)
## ChakraCore
CC generates a skeleton in javascript
https://github.com/chakra-core/ChakraCore/blob/2dba810c925eb366e44a1f7d7a5b2e289e2f8510/lib/Runtime/Library/InJavascript/Intl.js#L1746-L1746 https://github.com/chakra-core/ChakraCore/blob/2dba810c925eb366e44a1f7d7a5b2e289e2f8510/lib/Runtime/Library/InJavascript/Intl.js#L1295-L1459
and uses `udatpg_getBestPattern` to let libicu generate an appropriate pattern.
https://github.com/chakra-core/ChakraCore/blob/2dba810c925eb366e44a1f7d7a5b2e289e2f8510/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp#L2800 https://github.com/chakra-core/ChakraCore/blob/2dba810c925eb366e44a1f7d7a5b2e289e2f8510/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp#L2843-L2851
## libicu
The table below shows the behavior changes of `udatpg_getBestPattern` (`de-DE` is just for additional context)
Notice the missing `,` in `en-US` `v78.1`.
| version | locale | skeleton | pattern |
| ------- | ------ | -------- | --------------- |
| v77.1 | en-US | EEEEh | cccc, h/a |
| | | cccch | cccc, h/a |
| | de-DE | EEEEh | cccc, h 'Uhr' a |
| | | cccch | cccc, h 'Uhr' a |
| v78.1 | en-US | EEEEh | EEEE h/a |
| | | cccch | EEEE h/a |
| | de-DE | EEEEh | EEEE, h/a |
| | | cccch | EEEE, h/a |
Contributor guide
Assessment
This issue has not been assessed yet.