Skip to content

[Bug]: Intl.getCanonicalLocales tests fail on Windows Server 2022 due to mismatch ICU version #7059

Open

Description

@QuellaZhang

ChakraCore Version

97e68c9

Steps to reproduce

  • git clone https://github.com/microsoft/ChakraCore C:\gitP\microsoft\ChakraCore
  • cd /d C:\gitP\microsoft\ChakraCore
  • msbuild /m /p:Platform=x64 /p:Configuration=Test /p:WindowsTargetPlatformVersion=10.0.22621.0 Build\Chakra.Core.sln /t:Rebuild
  • cd /d C:\gitP\microsoft\ChakraCore\test
  • cmd.exe /c ver
  • python runtests.py -t --x64

Proof of concept

if (WScript.Platform.ICU_VERSION < 62) {
...
} else {
...
}

Exception or Error

[757/2600 0.16] Failed -> Intl\GetCanonicalLocales.js
C:\gitP\microsoft\ChakraCore\Build\VcBuild\bin\x64_Test\ch.exe -ExtendedErrorStackForTestHost -BaselineMode -WERExceptionSupport -maxInterpretCount:1 -maxSimpleJitRunCount:1 -bgjit- -dynamicprofilecache:profile.dpl.1105 -args summary -endargs C:\gitP\microsoft\ChakraCore\test\Intl\GetCanonicalLocales.js

Output:
----------------------------
ICU_VERSION = 64
de-DE-u-co-yes-kn-true
*** Running test #1 (0): Intl.getCanonicalLocales Functionality (according to ECMA 402 #sec-canonicalizelocalelist)
Test threw exception: assert.areEqual failed at (GetCanonicalLocales.js:102:17):
  expected: de-DE-u-co-kn
    actual: de-DE-u-co-yes-kn-true
   
FAILED
*** Running test #2 (1): Handling of unsupported tags and subtags (general canonicalization)
Test threw exception: assert.areEqual failed at (GetCanonicalLocales.js:139:17):
  expected: xx-ZZ-u-yy-zz
    actual: xx-ZZ-u-yy-yes-zz-yes
   
FAILED
Summary of tests: total executed: 11; passed: 9; failed: 2

Additional Context

We build Chakra using the latest MSVC to detect compiler regressions. After updating the SHA to 97e68c9, we observed that Chakra test exhibited different behaviors on CI test VMs compared to local test VMs. The root cause was conclusively identified as differences in the Windows and ICU versions.

Environment:
CI VM:

  • OS: Windows Server 2022 (10.0.20348)
  • ICU_VERSION: 64
  • Intl.getCanonicalLocales Output: "de-DE-u-co-yes-kn-true"
  • Chakra test result: 2 tests failed

Local VM:

  • OS: Windows 11 (10.0.22631)
  • ICU_VERSION: 68
  • Intl.getCanonicalLocales Output: "de-DE-u-co-kn"
  • Chakra test result: All passed

Activity

  1. ShortDevelopment commented on Apr 24, 2026

    @ShortDevelopment
    Contributor

    This was likely caused by my last PR (#7048)

  2. changed the title [-][Bug]: Intl.getCanonicalLocales tests fail on Windows Server 2022 due to dismatch ICU version[/-] [+][Bug]: Intl.getCanonicalLocales tests fail on Windows Server 2022 due to mismatch ICU version[/+] on Apr 27, 2026
  3. hiSandog commented on Jun 28, 2026

    @hiSandog

    Intl canonicalization tests are very sensitive to the ICU/CLDR data version installed on the host. If Windows Server 2022 carries a different ICU behavior than the CI baseline, the test should either pin the expected data version or assert a range of accepted canonical forms where the spec allows it. Including the ICU version in the test failure output would make these failures much easier to diagnose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions