From e9ab42effe16df302e24b19858fb38fcf049666e Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Fri, 20 Sep 2024 08:13:08 +0300 Subject: [PATCH 01/15] Parse version > 9 in dotnet.py --- scripts/dotnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dotnet.py b/scripts/dotnet.py index 211ac85a497..0200793bf6d 100755 --- a/scripts/dotnet.py +++ b/scripts/dotnet.py @@ -528,7 +528,7 @@ def run(self, FrameworkVersion = NamedTuple('FrameworkVersion', major=int, minor=int) @tracer.start_as_current_span("dotnet_get_framework_version") # type: ignore def get_framework_version(framework: str) -> FrameworkVersion: - groups = search(r".*(\d)\.(\d)$", framework) + groups = search(r".*(\d+)\.(\d+)$", framework) if not groups: raise ValueError("Unknown target framework: {}".format(framework)) From 36cb485d279751b0171af76cec18609d892212a3 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:53:14 +0300 Subject: [PATCH 02/15] More fixes --- scripts/dotnet.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/dotnet.py b/scripts/dotnet.py index 0200793bf6d..7a3e67f1da6 100755 --- a/scripts/dotnet.py +++ b/scripts/dotnet.py @@ -92,6 +92,8 @@ def get_target_framework_moniker(framework: str) -> str: return 'net8.0' if framework == 'nativeaot9.0': return 'net9.0' + if framework == 'nativeaot10.0': + return 'net10.0' else: return framework @@ -594,6 +596,9 @@ def get_dotnet_version_from_path( # Attempt 2: Increase the minor version by 1 and retry. sdk = next((f for f in sdks if f.startswith( "{}.{}".format(version.major, version.minor + 1))), None) + if not sdk: + if version.major == 9: + sdk = next((f for f in sdks if f.startswith("10.0")), None) if not sdk: sdk = next((f for f in sdks if f.startswith( "{}.{}".format('6', '0'))), None) From a143577f2147239760588d7606320d310d7e8fc6 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Fri, 20 Sep 2024 11:05:49 +0300 Subject: [PATCH 03/15] Print sdk dirs found in the CI --- scripts/dotnet.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/dotnet.py b/scripts/dotnet.py index 7a3e67f1da6..0da71db2359 100755 --- a/scripts/dotnet.py +++ b/scripts/dotnet.py @@ -588,6 +588,8 @@ def get_dotnet_version_from_path( ] sdks.sort(reverse=True) + print(f"SDKs found in {sdk_path}: {sdks}") + # Determine the SDK being used. # Attempt 1: Try to use exact match. sdk = next((f for f in sdks if f.startswith( From 3f308edfc7dd9534d3f6258a6b3f3d8a9a06bb1d Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Fri, 20 Sep 2024 11:10:50 +0300 Subject: [PATCH 04/15] Update scripts/dotnet.py --- scripts/dotnet.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/dotnet.py b/scripts/dotnet.py index 0da71db2359..55a1c9da895 100755 --- a/scripts/dotnet.py +++ b/scripts/dotnet.py @@ -589,6 +589,7 @@ def get_dotnet_version_from_path( sdks.sort(reverse=True) print(f"SDKs found in {sdk_path}: {sdks}") + print(f"Major version: {version.major}") # Determine the SDK being used. # Attempt 1: Try to use exact match. From 949627f16e9f41d65d1d51687e1a205c90b7e800 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Fri, 20 Sep 2024 11:20:01 +0300 Subject: [PATCH 05/15] Move diag to exception message --- scripts/dotnet.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/dotnet.py b/scripts/dotnet.py index 55a1c9da895..43574cf410f 100755 --- a/scripts/dotnet.py +++ b/scripts/dotnet.py @@ -588,9 +588,6 @@ def get_dotnet_version_from_path( ] sdks.sort(reverse=True) - print(f"SDKs found in {sdk_path}: {sdks}") - print(f"Major version: {version.major}") - # Determine the SDK being used. # Attempt 1: Try to use exact match. sdk = next((f for f in sdks if f.startswith( @@ -607,7 +604,8 @@ def get_dotnet_version_from_path( "{}.{}".format('6', '0'))), None) if not sdk: raise RuntimeError( - "Unable to determine the .NET SDK used for {}".format(framework) + f"Unable to determine the .NET SDK used for {framework}. " + f"SDKs found in {sdk_path}: {sdks}. Major version: {version.major}" ) return sdk From 14ce411dc352e2300d710c244933a8825e2cceb8 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Fri, 20 Sep 2024 11:41:52 +0300 Subject: [PATCH 06/15] Delete special condition (since we were not using the fork earlier) --- scripts/dotnet.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/dotnet.py b/scripts/dotnet.py index 43574cf410f..14625a2e0a3 100755 --- a/scripts/dotnet.py +++ b/scripts/dotnet.py @@ -596,9 +596,6 @@ def get_dotnet_version_from_path( # Attempt 2: Increase the minor version by 1 and retry. sdk = next((f for f in sdks if f.startswith( "{}.{}".format(version.major, version.minor + 1))), None) - if not sdk: - if version.major == 9: - sdk = next((f for f in sdks if f.startswith("10.0")), None) if not sdk: sdk = next((f for f in sdks if f.startswith( "{}.{}".format('6', '0'))), None) From 8bc04ef016e9d18872830306f7576f50c0ac8fd9 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:20:37 +0300 Subject: [PATCH 07/15] Reapply the workaround (needed after all= --- scripts/dotnet.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/dotnet.py b/scripts/dotnet.py index 14625a2e0a3..43574cf410f 100755 --- a/scripts/dotnet.py +++ b/scripts/dotnet.py @@ -596,6 +596,9 @@ def get_dotnet_version_from_path( # Attempt 2: Increase the minor version by 1 and retry. sdk = next((f for f in sdks if f.startswith( "{}.{}".format(version.major, version.minor + 1))), None) + if not sdk: + if version.major == 9: + sdk = next((f for f in sdks if f.startswith("10.0")), None) if not sdk: sdk = next((f for f in sdks if f.startswith( "{}.{}".format('6', '0'))), None) From a0df24ff87b117b984d09ea1804528c603deebdf Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:40:32 +0200 Subject: [PATCH 08/15] Allow more digits on the 1st position of version. --- scripts/dotnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dotnet.py b/scripts/dotnet.py index 43574cf410f..274f7771170 100755 --- a/scripts/dotnet.py +++ b/scripts/dotnet.py @@ -121,7 +121,7 @@ class VersionsAction(Action): def __call__(self, parser, namespace, values, option_string=None): if values: for version in values: - if not search(r'^\d\.\d+\.\d+', version): + if not search(r'^\d+\.\d+\.\d+', version): raise ArgumentTypeError( 'Version "{}" is in the wrong format'.format(version)) setattr(namespace, self.dest, values) From 4d8fe1392e6d4ad9701b4224b56959a0ded07609 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:37:46 +0300 Subject: [PATCH 09/15] return 10.0 for nativeaot9.0 --- scripts/dotnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dotnet.py b/scripts/dotnet.py index 274f7771170..358e2ae4937 100755 --- a/scripts/dotnet.py +++ b/scripts/dotnet.py @@ -91,7 +91,7 @@ def get_target_framework_moniker(framework: str) -> str: if framework == 'nativeaot8.0': return 'net8.0' if framework == 'nativeaot9.0': - return 'net9.0' + return 'net10.0' if framework == 'nativeaot10.0': return 'net10.0' else: From 6132bfe7e5b9c19f76e204e905fa8e2f4b66c14a Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:39:35 +0300 Subject: [PATCH 10/15] Update azure-pipelines.yml --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 42e88263e32..4b1ec2f5765 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -146,6 +146,7 @@ jobs: runCategories: 'runtime libraries' channels: - main + - nativeaot10.0 - nativeaot9.0 - nativeaot8.0 - 8.0 From 12260ecea0dba3c197b38cd29a2a84fd54805548 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:40:27 +0300 Subject: [PATCH 11/15] revert 9.0->10.0 --- scripts/dotnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dotnet.py b/scripts/dotnet.py index 358e2ae4937..274f7771170 100755 --- a/scripts/dotnet.py +++ b/scripts/dotnet.py @@ -91,7 +91,7 @@ def get_target_framework_moniker(framework: str) -> str: if framework == 'nativeaot8.0': return 'net8.0' if framework == 'nativeaot9.0': - return 'net10.0' + return 'net9.0' if framework == 'nativeaot10.0': return 'net10.0' else: From 16a797f2ccbfdf3eeb324f532b75ab74ff6572cf Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Fri, 20 Sep 2024 16:32:21 +0300 Subject: [PATCH 12/15] Update channel_map.py --- scripts/channel_map.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/channel_map.py b/scripts/channel_map.py index 1242af007ce..04acdc026b2 100644 --- a/scripts/channel_map.py +++ b/scripts/channel_map.py @@ -3,8 +3,8 @@ class ChannelMap(): channel_map = { 'main': { - 'tfm': 'net9.0', - 'branch': '9.0', + 'tfm': 'net10.0', + 'branch': '10.0', 'quality': 'daily' }, '10.0': { From de234814de62f371555626b4398097467c1d34c2 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Fri, 20 Sep 2024 16:50:02 +0300 Subject: [PATCH 13/15] Update Data.cs --- src/tools/ResultsComparer/Data.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tools/ResultsComparer/Data.cs b/src/tools/ResultsComparer/Data.cs index d6976408a6b..b1934d856db 100644 --- a/src/tools/ResultsComparer/Data.cs +++ b/src/tools/ResultsComparer/Data.cs @@ -158,6 +158,10 @@ private static string GetMoniker(string key) return "nativeaot9.0-preview" + key[key.IndexOf("nativeaot9.0-preview") + "nativeaot9.0-preview".Length]; if (key.Contains("net9.0")) return "net9.0"; + if (key.StartsWith("net10.0")) + return "net10.0"; + if (key.StartsWith("nativeaot10.0")) + return key; return null; } From 42cdb4e125abf562ea85a1cd4d744a8a8d211b49 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Fri, 20 Sep 2024 18:49:44 +0300 Subject: [PATCH 14/15] make regex non-greedy --- scripts/dotnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dotnet.py b/scripts/dotnet.py index 274f7771170..d66ec3925c4 100755 --- a/scripts/dotnet.py +++ b/scripts/dotnet.py @@ -530,7 +530,7 @@ def run(self, FrameworkVersion = NamedTuple('FrameworkVersion', major=int, minor=int) @tracer.start_as_current_span("dotnet_get_framework_version") # type: ignore def get_framework_version(framework: str) -> FrameworkVersion: - groups = search(r".*(\d+)\.(\d+)$", framework) + groups = search(r".*?(\d+)\.(\d+)$", framework) if not groups: raise ValueError("Unknown target framework: {}".format(framework)) From d96daa72a130c1a79a229bb213183d0e6f7c3958 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Mon, 23 Sep 2024 23:27:06 +0300 Subject: [PATCH 15/15] Address feedback --- azure-pipelines.yml | 1 - scripts/channel_map.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4b1ec2f5765..42e88263e32 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -146,7 +146,6 @@ jobs: runCategories: 'runtime libraries' channels: - main - - nativeaot10.0 - nativeaot9.0 - nativeaot8.0 - 8.0 diff --git a/scripts/channel_map.py b/scripts/channel_map.py index 04acdc026b2..1242af007ce 100644 --- a/scripts/channel_map.py +++ b/scripts/channel_map.py @@ -3,8 +3,8 @@ class ChannelMap(): channel_map = { 'main': { - 'tfm': 'net10.0', - 'branch': '10.0', + 'tfm': 'net9.0', + 'branch': '9.0', 'quality': 'daily' }, '10.0': {