From b9fde9ddf77f5e682ede021beee4c7d4d41e940f Mon Sep 17 00:00:00 2001 From: Max Katz Date: Wed, 11 Oct 2023 18:30:39 -0700 Subject: [PATCH 1/5] Pin android and iOS platform versions --- src/Android/Avalonia.Android/Avalonia.Android.csproj | 2 +- src/iOS/Avalonia.iOS/Avalonia.iOS.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Android/Avalonia.Android/Avalonia.Android.csproj b/src/Android/Avalonia.Android/Avalonia.Android.csproj index a5990a5f101..363ab2bc231 100644 --- a/src/Android/Avalonia.Android/Avalonia.Android.csproj +++ b/src/Android/Avalonia.Android/Avalonia.Android.csproj @@ -1,6 +1,6 @@  - net7.0-android + net7.0-android33 21 true true diff --git a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj index abb8f42977f..a411ae89b8d 100644 --- a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj +++ b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj @@ -1,6 +1,6 @@  - net7.0-ios + net7.0-ios16.2 13.0 true From ebb4fff8291731054f55ad599527315535b95353 Mon Sep 17 00:00:00 2001 From: Max Katz Date: Wed, 11 Oct 2023 18:31:07 -0700 Subject: [PATCH 2/5] Make TFM redirects in Api Validator better --- nukebuild/ApiDiffValidation.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/nukebuild/ApiDiffValidation.cs b/nukebuild/ApiDiffValidation.cs index 2a73dd278cf..c8115a81139 100644 --- a/nukebuild/ApiDiffValidation.cs +++ b/nukebuild/ApiDiffValidation.cs @@ -13,10 +13,11 @@ public static class ApiDiffValidation { private static readonly HttpClient s_httpClient = new(); - private static readonly Dictionary<(string target, string asmName), (string target, string asmName)> s_assemblyRedirects = new() + private static readonly (string oldTfm, string newTfm)[] s_tfmRedirects = new[] { - [("net6.0-android31.0", "Avalonia.Android.dll")] = ("net7.0-android33.0", "Avalonia.Android.dll"), - [("net6.0-ios16.1", "Avalonia.iOS.dll")] = ("net7.0-ios16.1", "Avalonia.iOS.dll") + // We use StartsWith below comparing these tfm, as we ignore platform versions (like, net6.0-ios16.1) + ("net6.0-android", "net7.0-android"), + ("net6.0-ios", "net7.0-ios") }; public static async Task ValidatePackage( @@ -64,13 +65,14 @@ public static async Task ValidatePackage( await baselineDll.entry.Open().CopyToAsync(baselineDllFile); } - if (!s_assemblyRedirects.TryGetValue((baselineDll.target, baselineDll.entry.Name), out var lookupPair)) + var targetTfm = baselineDll.target; + if (s_tfmRedirects.FirstOrDefault(t => baselineDll.target.StartsWith(t.oldTfm)).newTfm is {} newTfm) { - lookupPair = (baselineDll.target, baselineDll.entry.Name); + targetTfm = newTfm; } var targetDll = targetDlls.FirstOrDefault(e => - e.target == lookupPair.target && e.entry.Name == lookupPair.asmName); + e.target.StartsWith(targetTfm) && e.entry.Name == baselineDll.entry.Name); if (targetDll.entry is null) { throw new InvalidOperationException($"Some assemblies are missing in the new package {packageId}: {baselineDll.entry.Name} for {baselineDll.target}"); From 8d38cdf0baf78a7cdc2648ee27cb676cf7ebf5cd Mon Sep 17 00:00:00 2001 From: Max Katz Date: Wed, 11 Oct 2023 18:45:24 -0700 Subject: [PATCH 3/5] Update SDKs --- azure-pipelines-integrationtests.yml | 10 +++++----- azure-pipelines.yml | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/azure-pipelines-integrationtests.yml b/azure-pipelines-integrationtests.yml index 939d09c959a..39923ca7815 100644 --- a/azure-pipelines-integrationtests.yml +++ b/azure-pipelines-integrationtests.yml @@ -5,15 +5,15 @@ jobs: steps: - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 6.0.404' + displayName: 'Use .NET Core SDK 6.0.415' inputs: - version: 6.0.404 + version: 6.0.415 - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 7.0.101' + displayName: 'Use .NET Core SDK 7.0.402' inputs: - version: 7.0.101 - + version: 7.0.402 + - script: system_profiler SPDisplaysDataType |grep Resolution displayName: 'Get Resolution' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 12cfdd015f9..345378dbf27 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,14 +30,14 @@ jobs: vmImage: 'ubuntu-20.04' steps: - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 6.0.404' + displayName: 'Use .NET Core SDK 6.0.415' inputs: - version: 6.0.404 + version: 6.0.415 - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 7.0.101' + displayName: 'Use .NET Core SDK 7.0.402' inputs: - version: 7.0.101 + version: 7.0.402 - task: CmdLine@2 displayName: 'Install Workloads' From 0e654230db3e4dd539db94070c3930bd3f6b192c Mon Sep 17 00:00:00 2001 From: Max Katz Date: Wed, 11 Oct 2023 19:23:50 -0700 Subject: [PATCH 4/5] Downgrade to iOS 16.1 target --- src/iOS/Avalonia.iOS/Avalonia.iOS.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj index a411ae89b8d..4d52285bcfa 100644 --- a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj +++ b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj @@ -1,6 +1,6 @@  - net7.0-ios16.2 + net7.0-ios16.1 13.0 true From cadfc6f494a3a94f6787df5d1170b6fb1b32de49 Mon Sep 17 00:00:00 2001 From: Max Katz Date: Wed, 11 Oct 2023 20:28:07 -0700 Subject: [PATCH 5/5] Use even older version than before --- src/iOS/Avalonia.iOS/Avalonia.iOS.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj index 4d52285bcfa..49a122b8e12 100644 --- a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj +++ b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj @@ -1,6 +1,6 @@  - net7.0-ios16.1 + net7.0-ios16.0 13.0 true