From 9d72d19d8b282f4dd39a09e74470308557fa7a58 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20S=C3=A1nchez=20L=C3=B3pez?=
<1175054+carlossanlop@users.noreply.github.com>
Date: Tue, 16 May 2023 15:50:27 -0700
Subject: [PATCH 01/13] Revert "[6.0-staging] Reset OOB packages from 6.0.17
(#84598)" (#86351)
This reverts commit 162601f569188c3ce0b76f1cb414fdd338b9614f.
---
.../src/Microsoft.Extensions.Logging.Abstractions.csproj | 2 +-
.../src/System.DirectoryServices.Protocols.csproj | 2 +-
src/libraries/System.Management/src/System.Management.csproj | 2 +-
src/libraries/System.Text.Json/src/System.Text.Json.csproj | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj
index 1b443483dd66c9..51eab127e40e0a 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj
+++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj
@@ -17,7 +17,7 @@ Microsoft.Extensions.Logging.LogLevel
Microsoft.Extensions.Logging.Logger<T>
Microsoft.Extensions.Logging.LoggerMessage
Microsoft.Extensions.Logging.Abstractions.NullLogger
- false
+ true
4
diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj
index 3589676cda4d52..4b25592e6f785e 100644
--- a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj
+++ b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj
@@ -5,7 +5,7 @@
$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent);netcoreapp3.1-windows;netcoreapp3.1-OSX;netcoreapp3.1-Linux;netcoreapp3.1;netstandard2.0
true
- false
+ true
2
true
true
diff --git a/src/libraries/System.Management/src/System.Management.csproj b/src/libraries/System.Management/src/System.Management.csproj
index 041424b2b0bbaf..493c7105da4cbb 100644
--- a/src/libraries/System.Management/src/System.Management.csproj
+++ b/src/libraries/System.Management/src/System.Management.csproj
@@ -6,7 +6,7 @@
$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);netcoreapp3.1-windows;netcoreapp3.1;netstandard2.0
true
- false
+ true
2
true
true
diff --git a/src/libraries/System.Text.Json/src/System.Text.Json.csproj b/src/libraries/System.Text.Json/src/System.Text.Json.csproj
index f81e9dd4fd84c2..ff1de810a35d4e 100644
--- a/src/libraries/System.Text.Json/src/System.Text.Json.csproj
+++ b/src/libraries/System.Text.Json/src/System.Text.Json.csproj
@@ -9,7 +9,7 @@
enable
true
true
- false
+ true
8
Provides high-performance and low-allocating types that serialize objects to JavaScript Object Notation (JSON) text and deserialize JSON text to objects, with UTF-8 support built-in. Also provides types to read and write JSON text encoded as UTF-8, and to create an in-memory document object model (DOM), that is read-only, for random access of the JSON elements within a structured view of the data.
From 7c2281346b9f3c7933e43bdea8c9583d9a995431 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20S=C3=A1nchez=20L=C3=B3pez?=
<1175054+carlossanlop@users.noreply.github.com>
Date: Tue, 16 May 2023 15:51:17 -0700
Subject: [PATCH 02/13] Bump branding to 6.0.19 (#86298)
---
eng/Versions.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index 1549f3aebfaff1..b7d8594670f49f 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -5,7 +5,7 @@
6
0
- 18
+ 19
6.0.400
servicing
From 4422e203900d5fccbc17bd4a1f54755cb897b112 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20S=C3=A1nchez=20L=C3=B3pez?=
<1175054+carlossanlop@users.noreply.github.com>
Date: Thu, 18 May 2023 16:14:18 -0700
Subject: [PATCH 03/13] [6.0-staging] Update some Windows server helix queues
for mono (#86355)
* [6.0-staging] Update some Windows server helix queues
* Apply suggestions from code review
Co-authored-by: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com>
* Update eng/pipelines/libraries/helix-queues-setup.yml
---------
Co-authored-by: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com>
---
eng/pipelines/libraries/helix-queues-setup.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml
index da17438620d34f..1c62a53c0d831e 100644
--- a/eng/pipelines/libraries/helix-queues-setup.yml
+++ b/eng/pipelines/libraries/helix-queues-setup.yml
@@ -130,13 +130,13 @@ jobs:
- Windows.Amd64.Server2022.Open
- ${{ if ne(parameters.jobParameters.runtimeFlavor, 'mono') }}:
- (Windows.Nano.1809.Amd64.Open)windows.10.amd64.serverrs5.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1809-helix-amd64
- - (Windows.Server.Core.1909.Amd64.Open)windows.amd64.server2022.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-amd64
+ - (Windows.Server.Core.ltsc2022.Open)windows.amd64.server2022.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-ltsc2022-helix-amd64
- ${{ if ne(parameters.jobParameters.isFullMatrix, true) }}:
- Windows.81.Amd64.Open
- Windows.Amd64.Server2022.Open
- Windows.11.Amd64.Client.Open
- ${{ if eq(parameters.jobParameters.testScope, 'outerloop') }}:
- - (Windows.Server.Core.1909.Amd64.Open)windows.amd64.server2022.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-amd64
+ - (Windows.Server.Core.ltsc2022.Open)windows.amd64.server2022.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-ltsc2022-helix-amd64
- ${{ if ne(parameters.jobParameters.runtimeFlavor, 'mono') }}:
- (Windows.Nano.1809.Amd64.Open)windows.10.amd64.serverrs5.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1809-helix-amd64
From 41b90d05ad49ca08aa3eb9937fb247cfed17008f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20S=C3=A1nchez=20L=C3=B3pez?=
<1175054+carlossanlop@users.noreply.github.com>
Date: Mon, 22 May 2023 15:38:31 -0600
Subject: [PATCH 04/13] [6.0] Missing version bump number (#86600)
---
eng/Versions.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index b7d8594670f49f..834ead243dfcaf 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -1,7 +1,7 @@
- 6.0.18
+ 6.0.19
6
0
From c5fea1b9f1c51a1c5a0f33d0d64e22e986a9a3d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexander=20K=C3=B6plinger?=
Date: Tue, 23 May 2023 08:09:50 +0200
Subject: [PATCH 05/13] [6.0] Disable DllImportSearchPathsTest in mobile
(#86576)
Fixes https://github.com/dotnet/runtime/issues/86271
---
.../DllImportSearchPaths/DllImportSearchPathsTest.cs | 8 +++++++-
src/tests/issues.targets | 3 +++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/tests/Interop/DllImportSearchPaths/DllImportSearchPathsTest.cs b/src/tests/Interop/DllImportSearchPaths/DllImportSearchPathsTest.cs
index dcc6514ece1f15..8534824d20d7d9 100644
--- a/src/tests/Interop/DllImportSearchPaths/DllImportSearchPathsTest.cs
+++ b/src/tests/Interop/DllImportSearchPaths/DllImportSearchPathsTest.cs
@@ -10,13 +10,19 @@
public class DllImportSearchPathsTest
{
private static string Subdirectory => Path.Combine(NativeLibraryToLoad.GetDirectory(), "subdirectory");
+ private static bool CanLoadAssemblyInSubdirectory =>
+ !TestLibrary.Utilities.IsMonoLLVMFULLAOT &&
+ !OperatingSystem.IsAndroid() &&
+ !OperatingSystem.IsIOS() &&
+ !OperatingSystem.IsTvOS() &&
+ !OperatingSystem.IsBrowser();
static int Main(string[] args)
{
try
{
AssemblyDirectory_NotFound();
- if (!TestLibrary.Utilities.IsMonoLLVMFULLAOT)
+ if (CanLoadAssemblyInSubdirectory)
AssemblyDirectory_Found();
if (OperatingSystem.IsWindows())
diff --git a/src/tests/issues.targets b/src/tests/issues.targets
index 3bb40e41b8c214..31a054303b5095 100644
--- a/src/tests/issues.targets
+++ b/src/tests/issues.targets
@@ -2895,6 +2895,9 @@
https://github.com/dotnet/runtime/issues/53353
+
+ Loads an assembly from file
+
From 5f6ce83f7511992ff042ff3bf25c247e5c4a3590 Mon Sep 17 00:00:00 2001
From: Steve Pfister
Date: Tue, 23 May 2023 13:43:54 -0700
Subject: [PATCH 06/13] [release/6.0] Move to new osx test queue for ios
devices (#86648)
---
eng/pipelines/libraries/helix-queues-setup.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml
index 1c62a53c0d831e..5d1f216c7b805c 100644
--- a/eng/pipelines/libraries/helix-queues-setup.yml
+++ b/eng/pipelines/libraries/helix-queues-setup.yml
@@ -110,7 +110,7 @@ jobs:
# iOS devices
- ${{ if in(parameters.platform, 'iOS_arm64') }}:
- - OSX.1200.Amd64.Iphone.Open
+ - OSX.13.Amd64.Iphone.Open
# tvOS devices
- ${{ if in(parameters.platform, 'tvOS_arm64') }}:
From 24a26be703fe2540d8929d83b2d334f7685e47dd Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Thu, 8 Jun 2023 17:51:06 -0600
Subject: [PATCH 07/13] Update dependencies from
https://github.com/dotnet/emsdk build 20230607.5 (#87230)
Microsoft.NET.Workload.Emscripten.Manifest-6.0.100 , Microsoft.NET.Workload.Emscripten.Manifest-6.0.300 , Microsoft.NET.Workload.Emscripten.Manifest-6.0.400
From Version 6.0.18 -> To Version 6.0.19
Co-authored-by: dotnet-maestro[bot]
---
NuGet.config | 2 +-
eng/Version.Details.xml | 12 ++++++------
eng/Versions.props | 6 +++---
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 5bf92d101ff6bf..0d4f22f6ccf379 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -9,7 +9,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 133b9956b09f9e..2319972b1fa256 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -8,17 +8,17 @@
https://github.com/dotnet/msquic
7312355e44fd230b7aa26c7190f3870391751476
-
+
https://github.com/dotnet/emsdk
- a91ee4835f3c2bb33a4295ba3aae43479b50564d
+ 0e3ff3ea9054b5ab771db20d5a87923d97287bdb
-
+
https://github.com/dotnet/emsdk
- a91ee4835f3c2bb33a4295ba3aae43479b50564d
+ 0e3ff3ea9054b5ab771db20d5a87923d97287bdb
-
+
https://github.com/dotnet/emsdk
- a91ee4835f3c2bb33a4295ba3aae43479b50564d
+ 0e3ff3ea9054b5ab771db20d5a87923d97287bdb
https://github.com/dotnet/wcf
diff --git a/eng/Versions.props b/eng/Versions.props
index 834ead243dfcaf..6f3cccb6531250 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -175,9 +175,9 @@
11.1.0-alpha.1.21416.1
11.1.0-alpha.1.21416.1
- 6.0.18
- 6.0.18
- 6.0.18
+ 6.0.19
+ 6.0.19
+ 6.0.19
$(MicrosoftNETWorkloadEmscriptenManifest60100Version)
1.1.87-gba258badda
From e4c648c118dd49ec12ea5eefc3a014bd911d926e Mon Sep 17 00:00:00 2001
From: Tarek Mahmoud Sayed
Date: Fri, 9 Jun 2023 11:46:05 -0700
Subject: [PATCH 08/13] [release/6.0-staging] Fix creating cultures with
extensions in the name (#87177)
---
.../tests/CultureInfo/CultureInfoCtor.cs | 62 +++++++++
.../System/Globalization/CompareInfo.Icu.cs | 5 +-
.../src/System/Globalization/CompareInfo.cs | 2 +-
.../System/Globalization/CultureData.Icu.cs | 125 +++++++++++++++---
.../src/System/Globalization/CultureData.cs | 6 +
.../src/System/Globalization/CultureInfo.cs | 6 +
6 files changed, 186 insertions(+), 20 deletions(-)
diff --git a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCtor.cs b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCtor.cs
index 787f9e37f719db..c044808e1b7686 100644
--- a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCtor.cs
+++ b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCtor.cs
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using Microsoft.DotNet.RemoteExecutor;
using System.Collections.Generic;
using Xunit;
@@ -439,5 +440,66 @@ public void TestCreationWithTemporaryLCID(int lcid)
Assert.NotEqual(lcid, new CultureInfo(lcid).LCID);
}
+
+ [InlineData("zh-TW-u-co-zhuyin", "zh-TW", "zh-TW_zhuyin")]
+ [InlineData("de-DE-u-co-phonebk", "de-DE", "de-DE_phoneboo")]
+ [InlineData("de-DE-u-co-phonebk-u-xx", "de-DE-u-xx", "de-DE-u-xx_phoneboo")]
+ [InlineData("de-DE-u-xx-u-co-phonebk", "de-DE-u-xx-u-co-phonebk", "de-DE-u-xx-u-co-phonebk")]
+ [InlineData("de-DE-t-xx-u-co-phonebk", "de-DE-t-xx-u-co-phonebk", "de-DE-t-xx-u-co-phonebk_phoneboo")]
+ [InlineData("de-DE-u-co-phonebk-t-xx", "de-DE-t-xx", "de-DE-t-xx_phoneboo")]
+ [InlineData("de-DE-u-co-phonebk-t-xx-u-yy", "de-DE-t-xx-u-yy", "de-DE-t-xx-u-yy_phoneboo")]
+ [InlineData("de-DE", "de-DE", "de-DE")]
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsIcuGlobalization))]
+ public void TestCreationWithMangledSortName(string cultureName, string expectedCultureName, string expectedSortName)
+ {
+ CultureInfo ci = CultureInfo.GetCultureInfo(cultureName);
+
+ Assert.Equal(expectedCultureName, ci.Name);
+ Assert.Equal(expectedSortName, ci.CompareInfo.Name);
+ }
+
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsIcuGlobalization))]
+ public void TestNeutralCultureWithCollationName()
+ {
+ Assert.Throws(() => CultureInfo.GetCultureInfo("zh-u-co-zhuyin"));
+ Assert.Throws(() => CultureInfo.GetCultureInfo("de-u-co-phonebk"));
+ }
+
+ [InlineData("xx-u-XX", "xx-u-xx")]
+ [InlineData("xx-u-XX-u-yy", "xx-u-xx-u-yy")]
+ [InlineData("xx-t-ja-JP", "xx-t-ja-jp")]
+ [InlineData("qps-plocm", "qps-PLOCM")] // ICU normalize this name to "qps--plocm" which we normalize it back to "qps-plocm"
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsIcuGlobalization))]
+ public void TestCreationWithICUNormalizedNames(string cultureName, string expectedCultureName)
+ {
+ CultureInfo ci = CultureInfo.GetCultureInfo(cultureName);
+ Assert.Equal(expectedCultureName, ci.Name);
+ }
+
+ private static bool SupportRemoteExecutionWithIcu => RemoteExecutor.IsSupported && PlatformDetection.IsIcuGlobalization;
+
+ [InlineData("xx-u-XX")]
+ [InlineData("xx-u-XX-u-yy")]
+ [InlineData("xx-t-ja-JP")]
+ [InlineData("qps-plocm")]
+ [InlineData("zh-TW-u-co-zhuyin")]
+ [InlineData("de-DE-u-co-phonebk")]
+ [InlineData("de-DE-u-co-phonebk-u-xx")]
+ [InlineData("de-DE-u-xx-u-co-phonebk")]
+ [InlineData("de-DE-t-xx-u-co-phonebk")]
+ [InlineData("de-DE-u-co-phonebk-t-xx")]
+ [InlineData("de-DE-u-co-phonebk-t-xx-u-yy")]
+ [InlineData("de-DE")]
+ [ConditionalTheory(nameof(SupportRemoteExecutionWithIcu))]
+ public void TestWithResourceLookup(string cultureName)
+ {
+ RemoteExecutor.Invoke(name => {
+ CultureInfo.CurrentUICulture = CultureInfo.GetCultureInfo(name);
+ int Zero = 0;
+
+ // This should go through the resource manager to get the localized exception message using the current UI culture
+ Assert.Throws(() => 1 / Zero);
+ }, cultureName).Dispose();
+ }
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.Icu.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.Icu.cs
index a9b9274952ae0a..02c846c457beea 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.Icu.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.Icu.cs
@@ -14,7 +14,7 @@ public partial class CompareInfo
[NonSerialized]
private bool _isAsciiEqualityOrdinal;
- private void IcuInitSortHandle()
+ private void IcuInitSortHandle(string interopCultureName)
{
if (GlobalizationMode.Invariant)
{
@@ -23,6 +23,7 @@ private void IcuInitSortHandle()
else
{
Debug.Assert(!GlobalizationMode.UseNls);
+ Debug.Assert(interopCultureName != null);
// Inline the following condition to avoid potential implementation cycles within globalization
//
@@ -31,7 +32,7 @@ private void IcuInitSortHandle()
_isAsciiEqualityOrdinal = _sortName.Length == 0 ||
(_sortName.Length >= 2 && _sortName[0] == 'e' && _sortName[1] == 'n' && (_sortName.Length == 2 || _sortName[2] == '-'));
- _sortHandle = SortHandleCache.GetCachedSortHandle(_sortName);
+ _sortHandle = SortHandleCache.GetCachedSortHandle(interopCultureName);
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.cs
index b8e7d60a24ed18..bf68d1214d3616 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.cs
@@ -191,7 +191,7 @@ private void InitSort(CultureInfo culture)
}
else
{
- IcuInitSortHandle();
+ IcuInitSortHandle(culture.InteropName!);
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Icu.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Icu.cs
index 0d2035b9b40e14..2221cf8b7a9ff4 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Icu.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Icu.cs
@@ -12,6 +12,88 @@ internal sealed partial class CultureData
// ICU constants
private const int ICU_ULOC_KEYWORD_AND_VALUES_CAPACITY = 100; // max size of keyword or value
private const int ICU_ULOC_FULLNAME_CAPACITY = 157; // max size of locale name
+ private const int WINDOWS_MAX_COLLATION_NAME_LENGTH = 8; // max collation name length in the culture name
+
+ ///
+ /// Process the locale name that ICU returns and convert it to the format that .NET expects.
+ ///
+ /// The locale name that ICU returns.
+ /// The extension part in the original culture name.
+ /// The index of the collation in the name.
+ ///
+ /// BCP 47 specifications allow for extensions in the locale name, following the format language-script-region-extensions-collation. However,
+ /// not all extensions supported by ICU are supported in .NET. In the locale name, extensions are separated from the rest of the name using '-u-' or '-t-'.
+ /// In .NET, only the collation extension is supported. If the name includes a collation extension, it will be prefixed with '-u-co-'.
+ /// For example, en-US-u-co-search would be converted to the ICU name en_US@collation=search, which would then be translated to the .NET name en-US_search.
+ /// All extensions in the ICU names start with @. When normalizing the name to the .NET format, we retain the extensions in the name to ensure differentiation
+ /// between names with extensions and those without. For example, we may have a name like en-US and en-US-u-xx. Although .NET doesn't support the extension xx,
+ /// we still include it in the name to distinguish it from the name without the extension.
+ ///
+ private static string NormalizeCultureName(string name, ReadOnlySpan extension, out int collationStart)
+ {
+ Debug.Assert(name is not null);
+ Debug.Assert(name.Length <= ICU_ULOC_FULLNAME_CAPACITY);
+
+ collationStart = -1;
+ bool changed = false;
+ Span buffer = stackalloc char[ICU_ULOC_FULLNAME_CAPACITY];
+ int bufferIndex = 0;
+
+ for (int i = 0; i < name.Length && bufferIndex < ICU_ULOC_FULLNAME_CAPACITY; i++)
+ {
+ char c = name[i];
+ if (c == '-' && i < name.Length - 1 && name[i + 1] == '-')
+ {
+ // ICU changes names like `qps_plocm` (one underscore) to `qps__plocm` (two underscores)
+ // The reason this occurs is because, while ICU canonicalizing, ulocimp_getCountry returns an empty string since the country code value is > 3 (rightly so).
+ // But append an extra '_' thinking that country code was in-fact appended (for the empty string value as well).
+ // Before processing, the name qps__plocm will be converted to its .NET name equivalent, which is qps--plocm.
+ changed = true;
+ buffer[bufferIndex++] = '-';
+ i++;
+ }
+ else if (c == '@')
+ {
+ changed = true;
+
+ if (!extension.IsEmpty && extension.TryCopyTo(buffer.Slice(bufferIndex)))
+ {
+ bufferIndex += extension.Length;
+ }
+
+ int collationIndex = name.IndexOf("collation=", i + 1, StringComparison.Ordinal);
+ if (collationIndex > 0)
+ {
+ collationIndex += "collation=".Length;
+
+ // format of the locale properties is @key=value;collation=collationName;key=value;key=value
+ int endOfCollation = name.IndexOf(';', collationIndex);
+ if (endOfCollation < 0)
+ {
+ endOfCollation = name.Length;
+ }
+
+ int length = Math.Min(WINDOWS_MAX_COLLATION_NAME_LENGTH, endOfCollation - collationIndex); // Windows doesn't allow collation names longer than 8 characters
+ if (buffer.Length - bufferIndex >= length + 1)
+ {
+ collationStart = bufferIndex;
+ buffer[bufferIndex++] = '_';
+ name.AsSpan(collationIndex, length).CopyTo(buffer.Slice(bufferIndex));
+ bufferIndex += length;
+ }
+ }
+
+ // done getting all parts can be supported in the .NET culture names.
+ break;
+ }
+ else
+ {
+ buffer[bufferIndex++] = name[i];
+ }
+ }
+
+ return changed ? new string(buffer.Slice(0, bufferIndex)) : name;
+ }
///
/// This method uses the sRealName field (which is initialized by the constructor before this is called) to
@@ -26,16 +108,15 @@ private bool InitIcuCultureDataCore()
string realNameBuffer = _sRealName;
// Basic validation
- if (!IsValidCultureName(realNameBuffer, out var index))
+ if (!IsValidCultureName(realNameBuffer, out var index, out int indexOfExtensions))
{
return false;
}
// Replace _ (alternate sort) with @collation= for ICU
- ReadOnlySpan alternateSortName = default;
if (index > 0)
{
- alternateSortName = realNameBuffer.AsSpan(index + 1);
+ ReadOnlySpan alternateSortName = realNameBuffer.AsSpan(index + 1);
realNameBuffer = string.Concat(realNameBuffer.AsSpan(0, index), ICU_COLLATION_KEYWORD, alternateSortName);
}
@@ -47,16 +128,8 @@ private bool InitIcuCultureDataCore()
// Replace the ICU collation keyword with an _
Debug.Assert(_sWindowsName != null);
- index = _sWindowsName.IndexOf(ICU_COLLATION_KEYWORD, StringComparison.Ordinal);
- if (index >= 0)
- {
- _sName = string.Concat(_sWindowsName.AsSpan(0, index), "_", alternateSortName);
- }
- else
- {
- _sName = _sWindowsName;
- }
- _sRealName = _sName;
+
+ _sRealName = NormalizeCultureName(_sWindowsName, indexOfExtensions > 0 ? _sRealName.AsSpan(indexOfExtensions) : ReadOnlySpan.Empty, out int collationStart);
_iLanguage = LCID;
if (_iLanguage == 0)
@@ -65,11 +138,15 @@ private bool InitIcuCultureDataCore()
}
_bNeutral = TwoLetterISOCountryName.Length == 0;
_sSpecificCulture = _bNeutral ? IcuLocaleData.GetSpecificCultureName(_sRealName) : _sRealName;
- // Remove the sort from sName unless custom culture
- if (index > 0 && !_bNeutral && !IsCustomCultureId(_iLanguage))
+
+ if (_bNeutral && collationStart > 0)
{
- _sName = _sWindowsName.Substring(0, index);
+ return false; // neutral cultures cannot have collation
}
+
+ // Remove the sort from sName unless custom culture
+ _sName = collationStart < 0 ? _sRealName : _sRealName.Substring(0, collationStart);
+
return true;
}
@@ -414,10 +491,14 @@ private static string IcuGetConsoleFallbackName(string cultureName)
/// * Disallow input that starts or ends with '-' or '_'.
/// * Disallow input that has any combination of consecutive '-' or '_'.
/// * Disallow input that has multiple '_'.
+ ///
+ /// The IsValidCultureName method also identifies the presence of any extensions in the name (such as -u- or -t-) and returns the index of the extension.
+ /// This is necessary because we need to append the extensions to the name when normalizing it to the .NET format.
///
- private static bool IsValidCultureName(string subject, out int indexOfUnderscore)
+ private static bool IsValidCultureName(string subject, out int indexOfUnderscore, out int indexOfExtensions)
{
indexOfUnderscore = -1;
+ indexOfExtensions = -1;
if (subject.Length == 0) return true; // Invariant Culture
if (subject.Length == 1 || subject.Length > LocaleNameMaxLength) return false;
@@ -442,6 +523,16 @@ private static bool IsValidCultureName(string subject, out int indexOfUnderscore
seenUnderscore = true;
indexOfUnderscore = i;
}
+ else
+ {
+ if (indexOfExtensions < 0 && i < subject.Length - 2 && (subject[i + 1] is 'u' or 't') && subject[i + 2] == '-') // we have -u- or -t- which is an extension
+ {
+ if (subject[i + 1] == 't' || i >= subject.Length - 6 || subject[i + 3] != 'c' || subject[i + 4] != 'o' || subject[i + 5] != '-' ) // not -u-co- collation extension
+ {
+ indexOfExtensions = i;
+ }
+ }
+ }
}
else
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.cs
index 5766096c8c5781..9c4abfba9a90a3 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.cs
@@ -413,6 +413,12 @@ internal sealed partial class CultureData
private static volatile Dictionary? s_cachedRegions;
private static volatile Dictionary? s_regionNames;
+ ///
+ /// The culture name to use to interop with the underlying native globalization libraries like ICU or Windows NLS APIs.
+ /// For example, we can have the name de_DE@collation=phonebook when using ICU for the German culture de-DE with the phonebook sorting behavior.
+ ///
+ internal string? InteropName => _sWindowsName;
+
internal static CultureData? GetCultureDataForRegion(string? cultureName, bool useUserOverride)
{
// First do a shortcut for Invariant
diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs
index c0870e1f7a863e..baf1e6dd215017 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs
@@ -580,6 +580,12 @@ public static CultureInfo[] GetCultures(CultureTypes types)
///
internal string SortName => _sortName ??= _cultureData.SortName;
+ ///
+ /// The culture name to use to interop with the underlying native globalization libraries like ICU or Windows NLS APIs.
+ /// For example, we can have the name de_DE@collation=phonebook when using ICU for the German culture de-DE with the phonebook sorting behavior.
+ ///
+ internal string? InteropName => _cultureData.InteropName;
+
public string IetfLanguageTag =>
// special case the compatibility cultures
Name switch
From 02b24061db83903042fc993fb13e7bdfc40e34b3 Mon Sep 17 00:00:00 2001
From: Parker Bibus
Date: Mon, 12 Jun 2023 09:42:21 -0700
Subject: [PATCH 09/13] Forced Urllib to specific version and removed
force-reinstall clobbering the urllib install based on the release/7.0
backport of the same changes (#87286). (#87289)
---
.../coreclr/templates/run-performance-job.yml | 6 +++---
.../coreclr/templates/run-scenarios-job.yml | 16 ++++++++--------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml
index 596339fc05c182..888febcb9b430c 100644
--- a/eng/pipelines/coreclr/templates/run-performance-job.yml
+++ b/eng/pipelines/coreclr/templates/run-performance-job.yml
@@ -55,9 +55,9 @@ jobs:
- IsInternal: ''
- HelixApiAccessToken: ''
- - HelixPreCommandStemWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -m pip install -U pip;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install azure.storage.blob==12.0.0;py -3 -m pip install azure.storage.queue==12.0.0;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
- - HelixPreCommandStemLinux: 'export ORIGPYPATH=$PYTHONPATH;python3 -m pip install -U pip;sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install azure.storage.blob==12.0.0;pip3 install azure.storage.queue==12.0.0;sudo apt-get update;sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates;curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -;sudo apt-get -y install nodejs;sudo apt-get -y install npm;npm install --prefix $HELIX_WORKITEM_PAYLOAD jsvu -g;$HELIX_WORKITEM_PAYLOAD/bin/jsvu --os=linux64 --engines=v8,javascriptcore;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
- - HelixPreCommandStemMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib cargo;sudo apk add libgdiplus --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing; python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install azure.storage.blob==12.7.1;pip3 install azure.storage.queue==12.1.5;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+ - HelixPreCommandStemWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -m pip install -U pip;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install urllib3==1.26.15;py -3 -m pip install azure.storage.blob==12.0.0;py -3 -m pip install azure.storage.queue==12.0.0;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
+ - HelixPreCommandStemLinux: 'export ORIGPYPATH=$PYTHONPATH;python3 -m pip install -U pip;sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.15;pip3 install azure.storage.blob==12.0.0;pip3 install azure.storage.queue==12.0.0;sudo apt-get update;sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates;curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -;sudo apt-get -y install nodejs;sudo apt-get -y install npm;npm install --prefix $HELIX_WORKITEM_PAYLOAD jsvu -g;$HELIX_WORKITEM_PAYLOAD/bin/jsvu --os=linux64 --engines=v8,javascriptcore;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+ - HelixPreCommandStemMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib cargo;sudo apk add libgdiplus --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing; python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.15;pip3 install azure.storage.blob==12.7.1;pip3 install azure.storage.queue==12.1.5;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
- ExtraMSBuildLogsWindows: 'set MSBUILDDEBUGCOMM=1;set "MSBUILDDEBUGPATH=%HELIX_WORKITEM_UPLOAD_ROOT%"'
- ExtraMSBuildLogsLinux: 'export MSBUILDDEBUGCOMM=1;export "MSBUILDDEBUGPATH=$HELIX_WORKITEM_UPLOAD_ROOT"'
- HelixPreCommand: ''
diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
index 8861111ebd684c..c3d78c9b529731 100644
--- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml
+++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
@@ -34,7 +34,7 @@ jobs:
enableTelemetry: ${{ parameters.enableTelemetry }}
enablePublishBuildArtifacts: true
continueOnError: ${{ parameters.continueOnError }}
-
+
${{ if ne(parameters.displayName, '') }}:
displayName: '${{ parameters.displayName }}'
${{ if eq(parameters.displayName, '') }}:
@@ -59,19 +59,19 @@ jobs:
- SharedHelixPreCommands: 'call %HELIX_WORKITEM_PAYLOAD%\machine-setup.cmd;set PYTHONPATH=%HELIX_WORKITEM_PAYLOAD%\scripts%3B%HELIX_WORKITEM_PAYLOAD%'
- ${{ if ne(parameters.osGroup, 'windows') }}:
- SharedHelixPreCommands: 'chmod +x $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;. $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;export PYTHONPATH=$HELIX_WORKITEM_PAYLOAD/scripts:$HELIX_WORKITEM_PAYLOAD'
-
+
# extra private job settings
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- ${{ if eq(parameters.osGroup, 'windows') }}:
- - AdditionalHelixPreCommands: 'set ORIGPYPATH=%PYTHONPATH%;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
+ - AdditionalHelixPreCommands: 'set ORIGPYPATH=%PYTHONPATH%;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install --user azure.storage.blob==12.0.0;py -3 -m pip install --user azure.storage.queue==12.0.0;py -3 -m pip install --user urllib3==1.26.15;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
- AdditionalHelixPostCommands: 'set PYTHONPATH=%ORIGPYPATH%'
- - IsInternal: -Internal
+ - IsInternal: -Internal
- ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.osSubGroup, '_musl')) }}:
- - AdditionalHelixPreCommands: 'export ORIGPYPATH=$PYTHONPATH;sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+ - AdditionalHelixPreCommands: 'export ORIGPYPATH=$PYTHONPATH;sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user azure.storage.blob==12.0.0;pip3 install --user azure.storage.queue==12.0.0;pip3 install --user urllib3==1.26.15;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
- AdditionalHelixPostCommands: 'export PYTHONPATH=$ORIGPYPATH'
- IsInternal: --internal
- ${{ if and(ne(parameters.osGroup, 'windows'), eq(parameters.osSubGroup, '_musl')) }}:
- - AdditionalHelixPreCommands: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add py3-virtualenv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+ - AdditionalHelixPreCommands: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add py3-virtualenv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user azure.storage.blob==12.0.0;pip3 install --user azure.storage.queue==12.0.0;pip3 install --user urllib3==1.26.15;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
- AdditionalHelixPostCommands: 'export PYTHONPATH=$ORIGPYPATH'
- IsInternal: --internal
- group: DotNet-HelixApi-Access
@@ -100,7 +100,7 @@ jobs:
condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
continueOnError: ${{ parameters.continueOnError }}
# run ci-setup
- - script: $(Python) $(PerformanceDirectory)\scripts\ci_setup.py $(SetupArguments) --install-dir $(PayloadDirectory)\dotnet --output-file $(WorkItemDirectory)\machine-setup.cmd
+ - script: $(Python) $(PerformanceDirectory)\scripts\ci_setup.py $(SetupArguments) --install-dir $(PayloadDirectory)\dotnet --output-file $(WorkItemDirectory)\machine-setup.cmd
displayName: Run ci setup script (Windows)
condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
- script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments) --install-dir $(PayloadDirectory)/dotnet --output-file $(WorkItemDirectory)/machine-setup.sh
@@ -139,7 +139,7 @@ jobs:
env:
PERFLAB_TARGET_FRAMEWORKS: net6.0
condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
-
+
# run perf testing in helix
- template: /eng/pipelines/coreclr/templates/perf-send-to-helix.yml
parameters:
From e847db8a382e2b08d59e7e83850711731376ff7f Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Mon, 12 Jun 2023 16:23:03 -0700
Subject: [PATCH 10/13] [release/6.0-staging] Fix neutral cultures created with
the underscore (#87415)
Co-authored-by: Tarek Mahmoud Sayed
---
.../tests/CultureInfo/CultureInfoCtor.cs | 2 ++
.../src/System/Globalization/CultureData.Icu.cs | 8 ++------
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCtor.cs b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCtor.cs
index c044808e1b7686..2a8f2e6cd7e4df 100644
--- a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCtor.cs
+++ b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCtor.cs
@@ -469,6 +469,8 @@ public void TestNeutralCultureWithCollationName()
[InlineData("xx-u-XX-u-yy", "xx-u-xx-u-yy")]
[InlineData("xx-t-ja-JP", "xx-t-ja-jp")]
[InlineData("qps-plocm", "qps-PLOCM")] // ICU normalize this name to "qps--plocm" which we normalize it back to "qps-plocm"
+ [InlineData("zh_CN", "zh_cn")]
+ [InlineData("km_KH", "km_kh")]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsIcuGlobalization))]
public void TestCreationWithICUNormalizedNames(string cultureName, string expectedCultureName)
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Icu.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Icu.cs
index 2221cf8b7a9ff4..76898ae5e35b6c 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Icu.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Icu.cs
@@ -139,13 +139,9 @@ private bool InitIcuCultureDataCore()
_bNeutral = TwoLetterISOCountryName.Length == 0;
_sSpecificCulture = _bNeutral ? IcuLocaleData.GetSpecificCultureName(_sRealName) : _sRealName;
- if (_bNeutral && collationStart > 0)
- {
- return false; // neutral cultures cannot have collation
- }
-
// Remove the sort from sName unless custom culture
- _sName = collationStart < 0 ? _sRealName : _sRealName.Substring(0, collationStart);
+ // To ensure compatibility, it is necessary to allow the creation of cultures like zh_CN (using ICU notation) in the case of _bNeutral.
+ _sName = collationStart < 0 || _bNeutral ? _sRealName : _sRealName.Substring(0, collationStart);
return true;
}
From 542ba22fe025e6e4e4e3f758fe9c08f6a49d5595 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Mon, 12 Jun 2023 20:16:11 -0600
Subject: [PATCH 11/13] add RID for Debian 12 (#87440)
Co-authored-by: wfurt
---
.../src/runtime.compatibility.json | 68 +++++++++++++++++++
.../src/runtime.json | 35 ++++++++++
.../src/runtimeGroups.props | 2 +-
3 files changed, 104 insertions(+), 1 deletion(-)
diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/runtime.compatibility.json b/src/libraries/Microsoft.NETCore.Platforms/src/runtime.compatibility.json
index f072bc1d426ac8..bf9dcefffefbcd 100644
--- a/src/libraries/Microsoft.NETCore.Platforms/src/runtime.compatibility.json
+++ b/src/libraries/Microsoft.NETCore.Platforms/src/runtime.compatibility.json
@@ -3640,6 +3640,74 @@
"any",
"base"
],
+ "debian.12": [
+ "debian.12",
+ "debian",
+ "linux",
+ "unix",
+ "any",
+ "base"
+ ],
+ "debian.12-arm": [
+ "debian.12-arm",
+ "debian.12",
+ "debian-arm",
+ "debian",
+ "linux-arm",
+ "linux",
+ "unix-arm",
+ "unix",
+ "any",
+ "base"
+ ],
+ "debian.12-arm64": [
+ "debian.12-arm64",
+ "debian.12",
+ "debian-arm64",
+ "debian",
+ "linux-arm64",
+ "linux",
+ "unix-arm64",
+ "unix",
+ "any",
+ "base"
+ ],
+ "debian.12-armel": [
+ "debian.12-armel",
+ "debian.12",
+ "debian-armel",
+ "debian",
+ "linux-armel",
+ "linux",
+ "unix-armel",
+ "unix",
+ "any",
+ "base"
+ ],
+ "debian.12-x64": [
+ "debian.12-x64",
+ "debian.12",
+ "debian-x64",
+ "debian",
+ "linux-x64",
+ "linux",
+ "unix-x64",
+ "unix",
+ "any",
+ "base"
+ ],
+ "debian.12-x86": [
+ "debian.12-x86",
+ "debian.12",
+ "debian-x86",
+ "debian",
+ "linux-x86",
+ "linux",
+ "unix-x86",
+ "unix",
+ "any",
+ "base"
+ ],
"debian.8": [
"debian.8",
"debian",
diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/runtime.json b/src/libraries/Microsoft.NETCore.Platforms/src/runtime.json
index 2f1a877f698086..4bc419bbfde675 100644
--- a/src/libraries/Microsoft.NETCore.Platforms/src/runtime.json
+++ b/src/libraries/Microsoft.NETCore.Platforms/src/runtime.json
@@ -1076,6 +1076,41 @@
"debian-x86"
]
},
+ "debian.12": {
+ "#import": [
+ "debian"
+ ]
+ },
+ "debian.12-arm": {
+ "#import": [
+ "debian.12",
+ "debian-arm"
+ ]
+ },
+ "debian.12-arm64": {
+ "#import": [
+ "debian.12",
+ "debian-arm64"
+ ]
+ },
+ "debian.12-armel": {
+ "#import": [
+ "debian.12",
+ "debian-armel"
+ ]
+ },
+ "debian.12-x64": {
+ "#import": [
+ "debian.12",
+ "debian-x64"
+ ]
+ },
+ "debian.12-x86": {
+ "#import": [
+ "debian.12",
+ "debian-x86"
+ ]
+ },
"debian.8": {
"#import": [
"debian"
diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props b/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props
index 92a1c049d02cf4..5fe956f0be5515 100644
--- a/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props
+++ b/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props
@@ -59,7 +59,7 @@
linux
x64;x86;arm;armel;arm64
- 8;9;10;11
+ 8;9;10;11;12
false
From 08346882575da5a165921e8701fea2f8b7602ea2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20S=C3=A1nchez=20L=C3=B3pez?=
<1175054+carlossanlop@users.noreply.github.com>
Date: Mon, 12 Jun 2023 19:20:52 -0700
Subject: [PATCH 12/13] [release/6.0-staging] Reset OOB packages from 6.0.18
(#86299)
* Reset Microsoft.Extensions.Hosting.WindowsServices
* Reset Microsoft.Windows.Compatibility
* Reset System.ServiceProcess.ServiceController
* Reset Microsoft.NETCore.Platforms
* Reset Microsoft.Extensions.Logging.Abstractions (from last month)
* Reset System.DirectoryServices.Protocols (from last month)
* Reset System.Management (from last month)
* Reset System.Text.Json (from last month)
---
.../src/Microsoft.Extensions.Hosting.WindowsServices.csproj | 2 +-
.../src/Microsoft.Extensions.Logging.Abstractions.csproj | 2 +-
.../src/Microsoft.NETCore.Platforms.csproj | 2 +-
.../src/Microsoft.Windows.Compatibility.csproj | 2 +-
.../src/System.DirectoryServices.Protocols.csproj | 2 +-
src/libraries/System.Management/src/System.Management.csproj | 2 +-
.../src/System.ServiceProcess.ServiceController.csproj | 2 +-
src/libraries/System.Text.Json/src/System.Text.Json.csproj | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/Microsoft.Extensions.Hosting.WindowsServices.csproj b/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/Microsoft.Extensions.Hosting.WindowsServices.csproj
index 9757cd56763cb5..052c68ff8b2d99 100644
--- a/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/Microsoft.Extensions.Hosting.WindowsServices.csproj
+++ b/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/Microsoft.Extensions.Hosting.WindowsServices.csproj
@@ -4,7 +4,7 @@
net461;netstandard2.0;netstandard2.1
true
.NET hosting infrastructure for Windows Services.
- true
+ false
2
diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj
index 51eab127e40e0a..1b443483dd66c9 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj
+++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj
@@ -17,7 +17,7 @@ Microsoft.Extensions.Logging.LogLevel
Microsoft.Extensions.Logging.Logger<T>
Microsoft.Extensions.Logging.LoggerMessage
Microsoft.Extensions.Logging.Abstractions.NullLogger
- true
+ false
4
diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj b/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
index dde76f41f06cf5..b4f865a8e0cbec 100644
--- a/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
+++ b/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
@@ -20,7 +20,7 @@
$(AdditionalRuntimeIdentifiers);$(OutputRID)
10
- true
+ false
diff --git a/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj b/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj
index aff4bb11d3e8c6..bc6c1decca31c1 100644
--- a/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj
+++ b/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj
@@ -5,7 +5,7 @@
false
true
- true
+ false
6
$(NoWarn);NU5128
diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj
index 4b25592e6f785e..3589676cda4d52 100644
--- a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj
+++ b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj
@@ -5,7 +5,7 @@
$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent);netcoreapp3.1-windows;netcoreapp3.1-OSX;netcoreapp3.1-Linux;netcoreapp3.1;netstandard2.0
true
- true
+ false
2
true
true
diff --git a/src/libraries/System.Management/src/System.Management.csproj b/src/libraries/System.Management/src/System.Management.csproj
index 493c7105da4cbb..041424b2b0bbaf 100644
--- a/src/libraries/System.Management/src/System.Management.csproj
+++ b/src/libraries/System.Management/src/System.Management.csproj
@@ -6,7 +6,7 @@
$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);netcoreapp3.1-windows;netcoreapp3.1;netstandard2.0
true
- true
+ false
2
true
true
diff --git a/src/libraries/System.ServiceProcess.ServiceController/src/System.ServiceProcess.ServiceController.csproj b/src/libraries/System.ServiceProcess.ServiceController/src/System.ServiceProcess.ServiceController.csproj
index 5ca6ed199bc8ab..0402a8aae9cd3a 100644
--- a/src/libraries/System.ServiceProcess.ServiceController/src/System.ServiceProcess.ServiceController.csproj
+++ b/src/libraries/System.ServiceProcess.ServiceController/src/System.ServiceProcess.ServiceController.csproj
@@ -6,7 +6,7 @@
enable
true
- true
+ false
1
Provides the System.ServiceProcess.ServiceContainer class, which allows you to connect to a running or stopped service, manipulate it, or get information about it.
diff --git a/src/libraries/System.Text.Json/src/System.Text.Json.csproj b/src/libraries/System.Text.Json/src/System.Text.Json.csproj
index ff1de810a35d4e..f81e9dd4fd84c2 100644
--- a/src/libraries/System.Text.Json/src/System.Text.Json.csproj
+++ b/src/libraries/System.Text.Json/src/System.Text.Json.csproj
@@ -9,7 +9,7 @@
enable
true
true
- true
+ false
8
Provides high-performance and low-allocating types that serialize objects to JavaScript Object Notation (JSON) text and deserialize JSON text to objects, with UTF-8 support built-in. Also provides types to read and write JSON text encoded as UTF-8, and to create an in-memory document object model (DOM), that is read-only, for random access of the JSON elements within a structured view of the data.
From 6aea0b6e0fdd70694bce7865b562f1f5cb982d8e Mon Sep 17 00:00:00 2001
From: Tarek Mahmoud Sayed
Date: Mon, 12 Jun 2023 21:56:18 -0700
Subject: [PATCH 13/13] [Test Only] Test Cleanup (#87456)
---
.../tests/CultureInfo/CultureInfoCtor.cs | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCtor.cs b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCtor.cs
index 2a8f2e6cd7e4df..469add3f04fca0 100644
--- a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCtor.cs
+++ b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCtor.cs
@@ -441,6 +441,8 @@ public void TestCreationWithTemporaryLCID(int lcid)
Assert.NotEqual(lcid, new CultureInfo(lcid).LCID);
}
+ private static bool NotWasmWithIcu => PlatformDetection.IsNotBrowser && PlatformDetection.IsIcuGlobalization;
+
[InlineData("zh-TW-u-co-zhuyin", "zh-TW", "zh-TW_zhuyin")]
[InlineData("de-DE-u-co-phonebk", "de-DE", "de-DE_phoneboo")]
[InlineData("de-DE-u-co-phonebk-u-xx", "de-DE-u-xx", "de-DE-u-xx_phoneboo")]
@@ -449,7 +451,7 @@ public void TestCreationWithTemporaryLCID(int lcid)
[InlineData("de-DE-u-co-phonebk-t-xx", "de-DE-t-xx", "de-DE-t-xx_phoneboo")]
[InlineData("de-DE-u-co-phonebk-t-xx-u-yy", "de-DE-t-xx-u-yy", "de-DE-t-xx-u-yy_phoneboo")]
[InlineData("de-DE", "de-DE", "de-DE")]
- [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsIcuGlobalization))]
+ [ConditionalTheory(nameof(NotWasmWithIcu))]
public void TestCreationWithMangledSortName(string cultureName, string expectedCultureName, string expectedSortName)
{
CultureInfo ci = CultureInfo.GetCultureInfo(cultureName);
@@ -458,20 +460,13 @@ public void TestCreationWithMangledSortName(string cultureName, string expectedC
Assert.Equal(expectedSortName, ci.CompareInfo.Name);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsIcuGlobalization))]
- public void TestNeutralCultureWithCollationName()
- {
- Assert.Throws(() => CultureInfo.GetCultureInfo("zh-u-co-zhuyin"));
- Assert.Throws(() => CultureInfo.GetCultureInfo("de-u-co-phonebk"));
- }
-
[InlineData("xx-u-XX", "xx-u-xx")]
[InlineData("xx-u-XX-u-yy", "xx-u-xx-u-yy")]
[InlineData("xx-t-ja-JP", "xx-t-ja-jp")]
[InlineData("qps-plocm", "qps-PLOCM")] // ICU normalize this name to "qps--plocm" which we normalize it back to "qps-plocm"
[InlineData("zh_CN", "zh_cn")]
[InlineData("km_KH", "km_kh")]
- [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsIcuGlobalization))]
+ [ConditionalTheory(nameof(NotWasmWithIcu))]
public void TestCreationWithICUNormalizedNames(string cultureName, string expectedCultureName)
{
CultureInfo ci = CultureInfo.GetCultureInfo(cultureName);