From 95d9ea9d2786f6ec49a051c5cff47dc42591e54f Mon Sep 17 00:00:00 2001 From: Ian Griffiths Date: Wed, 14 Jun 2023 11:37:11 +0100 Subject: [PATCH] Remove dynamic load of QueryDebugger (#1968) --- Rx.NET/Documentation/ReleaseHistory/Rx.v6.md | 6 +++++- .../CurrentPlatformEnlightenmentProvider.cs | 20 +------------------ Rx.NET/Source/version.json | 2 +- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/Rx.NET/Documentation/ReleaseHistory/Rx.v6.md b/Rx.NET/Documentation/ReleaseHistory/Rx.v6.md index b37c62571..99342ba66 100644 --- a/Rx.NET/Documentation/ReleaseHistory/Rx.v6.md +++ b/Rx.NET/Documentation/ReleaseHistory/Rx.v6.md @@ -1,6 +1,10 @@ # Rx Release History v6.0 -## v6.0.0-preview +## v6.0.1-preview + +This release fixes [Issue #1942: "AOT compilation produces single trim analysis warning"](https://github.com/dotnet/reactive/issues/1942) + +## v6.0.0 ### Breaking changes diff --git a/Rx.NET/Source/src/System.Reactive/Internal/CurrentPlatformEnlightenmentProvider.cs b/Rx.NET/Source/src/System.Reactive/Internal/CurrentPlatformEnlightenmentProvider.cs index 79f258f70..57079778d 100644 --- a/Rx.NET/Source/src/System.Reactive/Internal/CurrentPlatformEnlightenmentProvider.cs +++ b/Rx.NET/Source/src/System.Reactive/Internal/CurrentPlatformEnlightenmentProvider.cs @@ -68,27 +68,9 @@ public class CurrentPlatformEnlightenmentProvider : IPlatformEnlightenmentProvid // expectation it'd be pretty hard to turn on interception dynamically // upon a debugger attach event, so we should make this check early. // - // In the initial release of v2.0 (RTM), we won't have the corresponding - // debugger assembly available yet, so the dynamic load would always - // fail. We also don't want to take the price of (an attempt to) a dynamic - // assembly load for the regular production case. - // if (Debugger.IsAttached) { - var ifType = t.GetTypeInfo(); - - var asm = new AssemblyName(ifType.Assembly.FullName!) - { - Name = "System.Reactive" - }; - - var name = "System.Reactive.Linq.QueryDebugger, " + asm.FullName; - - var dbg = Type.GetType(name, false); - if (dbg != null) - { - return (T?)Activator.CreateInstance(dbg); - } + return (T)(object)new QueryDebugger(); } } diff --git a/Rx.NET/Source/version.json b/Rx.NET/Source/version.json index 5f1d6aaa7..c3ae3ab45 100644 --- a/Rx.NET/Source/version.json +++ b/Rx.NET/Source/version.json @@ -1,5 +1,5 @@ { - "version": "6.0.0-preview.{height}", + "version": "6.0.1-preview.{height}", "publicReleaseRefSpec": [ "^refs/heads/main$", // we release out of main "^refs/heads/rel/v\\d+\\.\\d+", // we also release branches starting with rel/vN.N