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

Make NLS default globalization mode #44008

Merged
merged 2 commits into from
Oct 29, 2020

Conversation

safern
Copy link
Member

@safern safern commented Oct 29, 2020

This is to test what happens with upstack repos and to move early before the decision is made. If we don't want this we can always revert this change.

cc: @danmosemsft @mmitche @SteveCarrollMSFT

Copy link
Member

@danmoseley danmoseley left a comment

Choose a reason for hiding this comment

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

Seems to make sense to me.

@ghost
Copy link

ghost commented Oct 29, 2020

Tagging subscribers to this area: @tarekgh, @safern, @krwq
See info in area-owners.md if you want to be subscribed.

Copy link
Member

@GrabYourPitchforks GrabYourPitchforks left a comment

Choose a reason for hiding this comment

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

LGTM, some questions and a request that we change the target URL.

@safern
Copy link
Member Author

safern commented Oct 29, 2020

Note: this also changes Mono Desktop default. I guess it makes sense to be consistent.

cc: @marek-safar @steveisok

@GrabYourPitchforks
Copy link
Member

Failing test System.Numerics.Vectors.Tests is known issue #41108.

@safern
Copy link
Member Author

safern commented Oct 29, 2020

So I just doubled checked that the script to change the test mode works... this is a test run in Windows8

icu was not found, so running the tests using NLS.
Updating nls switch in System.Globalization.Icu.Tests.runtimeconfig.json to true...
----- start Thu 10/29/2020  5:05:14.56 ===============  To repro directly: ===================================================== 
pushd C:\h\w\B9870A42\w\B04E0993\e\
"C:\h\w\B9870A42\p\dotnet.exe" exec --runtimeconfig System.Globalization.Icu.Tests.runtimeconfig.json --depsfile System.Globalization.Icu.Tests.deps.json xunit.console.dll System.Globalization.Icu.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing 
popd
===========================================================================================================

C:\h\w\B9870A42\w\B04E0993\e>"C:\h\w\B9870A42\p\dotnet.exe" exec --runtimeconfig System.Globalization.Icu.Tests.runtimeconfig.json --depsfile System.Globalization.Icu.Tests.deps.json xunit.console.dll System.Globalization.Icu.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing  
  Discovering: System.Globalization.Icu.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Globalization.Icu.Tests (found 435 of 439 test cases)
  Starting:    System.Globalization.Icu.Tests (parallel test collections = on, max threads = 2)
    System.Globalization.Tests.GetCultureInfoTests.GetCultureInfo [SKIP]
      Condition(s) not met: "PlatformSupportsFakeCulture"
    System.Globalization.Tests.GetCultureInfoTests.TestGetCultureInfoWithNoneConstructedCultures [SKIP]
      Condition(s) not met: "PlatformSupportsFakeCulture"
    System.Globalization.Tests.GetCultureInfoTests.TestFakeCultureNames [SKIP]
      Condition(s) not met: "PlatformSupportsFakeCulture"
    System.Globalization.Tests.GetCultureInfoTests.TestInvalidCultureNames [SKIP]
      Condition(s) not met: "PlatformSupportsFakeCulture"
    System.Globalization.Tests.NumberFormatInfoPercentPositivePattern.PercentPositivePattern_Get_ReturnsExpected_ICU [SKIP]
      Condition(s) not met: "IsIcuGlobalization"
    System.Globalization.Tests.DateTimeFormatInfoLongTimePattern.LongTimePattern_CheckReadingTimeFormatWithSingleQuotes_ICU [SKIP]
      Condition(s) not met: "IsIcuGlobalization"
 System.Globalization.Tests.NumberFormatInfoPercentNegativePattern.PercentNegativePattern_Get_ReturnsExpected_ICU [SKIP]
      Condition(s) not met: "IsIcuGlobalization"

That shows at the top that it didn't find ICU and as you can see it didn't meet the IsIcuGlobalization condition in some of the tests there.

Then this is the output of a Windows 19H1 test run which ICU is supported:

ICU exists in system, running tests with ICU.
----- start Thu 10/29/2020  5:15:41.18 ===============  To repro directly: ===================================================== 
pushd C:\h\w\AF3409E2\w\A34B0915\e\
"C:\h\w\AF3409E2\p\dotnet.exe" exec --runtimeconfig System.Globalization.Icu.Tests.runtimeconfig.json --depsfile System.Globalization.Icu.Tests.deps.json xunit.console.dll System.Globalization.Icu.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing 
popd
===========================================================================================================

C:\h\w\AF3409E2\w\A34B0915\e>"C:\h\w\AF3409E2\p\dotnet.exe" exec --runtimeconfig System.Globalization.Icu.Tests.runtimeconfig.json --depsfile System.Globalization.Icu.Tests.deps.json xunit.console.dll System.Globalization.Icu.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing  
  Discovering: System.Globalization.Icu.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Globalization.Icu.Tests (found 435 of 439 test cases)
  Starting:    System.Globalization.Icu.Tests (parallel test collections = on, max threads = 2)
    System.Globalization.Tests.CultureInfoAll.TestAllCultures_Nls [SKIP]
      Condition(s) not met: "IsNlsGlobalization"
  Finished:    System.Globalization.Icu.Tests
=== TEST EXECUTION SUMMARY ===
   System.Globalization.Icu.Tests  Total: 1857, Errors: 0, Failed: 0, Skipped: 1, Time: 20.473s

You can see ICU exists in system, running tests with ICU. at the top and also, Condition(s) not met: "IsNlsGlobalization".

@danmoseley
Copy link
Member

Thanks for checking

string? switchValue = Environment.GetEnvironmentVariable(envVariable);
if (switchValue != null)
if (!string.IsNullOrEmpty(switchValue))
{
ret = bool.IsTrueStringIgnoreCase(switchValue) || switchValue.Equals("1");
Copy link
Member Author

Choose a reason for hiding this comment

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

Just an idea came to mind: Should we check for false instead when defaultValue == true?

Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't reset things for that.

@mmitche
Copy link
Member

mmitche commented Oct 29, 2020

@safern Good to merge as soon as you're reasonably comfortable with it.

@mmitche mmitche merged commit 7ef6d50 into dotnet:release/5.0 Oct 29, 2020
@safern safern deleted the MakeNlsDefaultGlobalizationMode branch October 29, 2020 15:22
@danmoseley
Copy link
Member

Note for anyone coming across this PR: this does not mean there is a plan change: we are just gathering more data to inform a decision.

safern added a commit to safern/runtime that referenced this pull request Oct 30, 2020
jkotas pushed a commit that referenced this pull request Nov 1, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants