Browse Source

Remove dynamic load of QueryDebugger (#1968)

Ian Griffiths 2 years ago
parent
commit
95d9ea9d27

+ 5 - 1
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
 

+ 1 - 19
Rx.NET/Source/src/System.Reactive/Internal/CurrentPlatformEnlightenmentProvider.cs

@@ -68,27 +68,9 @@ namespace System.Reactive.PlatformServices
                 // 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();
                 }
             }
 

+ 1 - 1
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