From b2aa80cbe60c4a2b2f4d68ab991acabc28d986fe Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Mon, 23 Oct 2023 10:41:20 -0700 Subject: [PATCH 1/6] Update SDK to 23523.1 --- global.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index f3b43e4ad4e0..64c5255ffc40 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "9.0.100-alpha.1.23504.14" + "version": "9.0.100-alpha.1.23523.1" }, "tools": { - "dotnet": "9.0.100-alpha.1.23504.14", + "dotnet": "9.0.100-alpha.1.23523.1", "runtimes": { "dotnet/x86": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" From 5d1f927cb4eb0a84f0f077bb40117d34853a22f7 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Tue, 24 Oct 2023 15:04:26 -0700 Subject: [PATCH 2/6] Update global.json --- global.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index 64c5255ffc40..d6718a31b494 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "9.0.100-alpha.1.23523.1" + "version": "9.0.100-alpha.1.23524.8" }, "tools": { - "dotnet": "9.0.100-alpha.1.23523.1", + "dotnet": "9.0.100-alpha.1.23524.8", "runtimes": { "dotnet/x86": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" From b468e8235e64ccd4f0f5aeca72a6c18096728b83 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Thu, 26 Oct 2023 07:39:08 +0800 Subject: [PATCH 3/6] Fix SignalR await warning --- src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs index 26c62befff0a..16cb0ba56059 100644 --- a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs +++ b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs @@ -863,7 +863,7 @@ async Task ReadAsyncEnumerableStream() { var streamValues = AsyncEnumerableAdapters.MakeCancelableTypedAsyncEnumerable(stream, tokenSource); - await foreach (var streamValue in streamValues) + await foreach (var streamValue in streamValues.ConfigureAwait(false)) { await SendWithLock(connectionState, new StreamItemMessage(streamId, streamValue), tokenSource.Token).ConfigureAwait(false); Log.SendingStreamItem(_logger, streamId); From 533a66cfce8103d0b35d3769e1e67234a900bc85 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Thu, 26 Oct 2023 07:57:55 +0800 Subject: [PATCH 4/6] Suppress DotNetDispatcher warning with pragma --- .../src/Infrastructure/DotNetDispatcher.cs | 5 +++++ .../src/Microsoft.JSInterop.WarningSuppressions.xml | 10 ++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/JSInterop/Microsoft.JSInterop/src/Infrastructure/DotNetDispatcher.cs b/src/JSInterop/Microsoft.JSInterop/src/Infrastructure/DotNetDispatcher.cs index 5640fce75a5f..ae27d63b2db7 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/Infrastructure/DotNetDispatcher.cs +++ b/src/JSInterop/Microsoft.JSInterop/src/Infrastructure/DotNetDispatcher.cs @@ -388,7 +388,12 @@ private static Task GetTaskByType(Type type, object obj) private static (MethodInfo methodInfo, Type[] parameterTypes) GetCachedMethodInfo(IDotNetObjectReference objectReference, string methodIdentifier) { var type = objectReference.Value.GetType(); + + // Suppressed with "pragma warning disable" instead of WarningSuppressions.xml so ILLink Roslyn Anayzer doesn't report the warning. +#pragma warning disable IL2111 // Method with parameters or return value with `DynamicallyAccessedMembersAttribute` is accessed via reflection. Trimmer can't guarantee availability of the requirements of the method. var assemblyMethods = _cachedMethodsByType.GetOrAdd(type, ScanTypeForCallableMethods); +#pragma warning restore IL2111 // Method with parameters or return value with `DynamicallyAccessedMembersAttribute` is accessed via reflection. Trimmer can't guarantee availability of the requirements of the method. + if (assemblyMethods.TryGetValue(methodIdentifier, out var result)) { return result; diff --git a/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.WarningSuppressions.xml b/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.WarningSuppressions.xml index 1af0e56483dc..30ba079bc35a 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.WarningSuppressions.xml +++ b/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.WarningSuppressions.xml @@ -1,4 +1,4 @@ - + @@ -67,11 +67,5 @@ member M:Microsoft.JSInterop.JSRuntimeExtensions.<InvokeAsync>d__4`1.MoveNext - - ILLink - IL2111 - member - M:Microsoft.JSInterop.Infrastructure.DotNetDispatcher.GetCachedMethodInfo(Microsoft.JSInterop.Infrastructure.IDotNetObjectReference,System.String) - - \ No newline at end of file + From 789542981990c781f58b1b895047f315a9eaf8e1 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Thu, 26 Oct 2023 08:19:09 +0800 Subject: [PATCH 5/6] Re-add XML suppression --- .../src/Microsoft.JSInterop.WarningSuppressions.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.WarningSuppressions.xml b/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.WarningSuppressions.xml index 30ba079bc35a..35166cf65fd7 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.WarningSuppressions.xml +++ b/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.WarningSuppressions.xml @@ -67,5 +67,11 @@ member M:Microsoft.JSInterop.JSRuntimeExtensions.<InvokeAsync>d__4`1.MoveNext + + ILLink + IL2111 + member + M:Microsoft.JSInterop.Infrastructure.DotNetDispatcher.GetCachedMethodInfo(Microsoft.JSInterop.Infrastructure.IDotNetObjectReference,System.String) + From 211f0e2901b5cc662829cf9d59bd8f1ef58e4bb6 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Thu, 26 Oct 2023 08:47:20 +0800 Subject: [PATCH 6/6] Update src/JSInterop/Microsoft.JSInterop/src/Infrastructure/DotNetDispatcher.cs Co-authored-by: Sven Boemer --- .../Microsoft.JSInterop/src/Infrastructure/DotNetDispatcher.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JSInterop/Microsoft.JSInterop/src/Infrastructure/DotNetDispatcher.cs b/src/JSInterop/Microsoft.JSInterop/src/Infrastructure/DotNetDispatcher.cs index ae27d63b2db7..4eac83f8b98c 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/Infrastructure/DotNetDispatcher.cs +++ b/src/JSInterop/Microsoft.JSInterop/src/Infrastructure/DotNetDispatcher.cs @@ -389,7 +389,7 @@ private static (MethodInfo methodInfo, Type[] parameterTypes) GetCachedMethodInf { var type = objectReference.Value.GetType(); - // Suppressed with "pragma warning disable" instead of WarningSuppressions.xml so ILLink Roslyn Anayzer doesn't report the warning. + // Suppressed with "pragma warning disable" in addition to WarningSuppressions.xml so ILLink Roslyn Anayzer doesn't report the warning. #pragma warning disable IL2111 // Method with parameters or return value with `DynamicallyAccessedMembersAttribute` is accessed via reflection. Trimmer can't guarantee availability of the requirements of the method. var assemblyMethods = _cachedMethodsByType.GetOrAdd(type, ScanTypeForCallableMethods); #pragma warning restore IL2111 // Method with parameters or return value with `DynamicallyAccessedMembersAttribute` is accessed via reflection. Trimmer can't guarantee availability of the requirements of the method.