Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dynamic load of QueryDebugger #1968

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

idg10
Copy link
Collaborator

@idg10 idg10 commented Jun 14, 2023

(Just use new() instead.)

Resolves #1942

This dynamic load has been unnecessary since commit 40e8696 modified CurrentPlatformEnlightenmentProvider to look for QueryDebugger in the assembly named System.Reactive. Before that, it used to look for one called System.Reactive.Debugger, in which case a dynamic load would have made sense. But since for almost 6 years now, it has been passing "System.Reactive" as the assembly name, there is absolutely no reason for this to be a dynamic load. The code that performs this dynamic load is also in System.Reactive, so the dynamic load is completely pointless.

This only ever happened when the debugger was attached, but it has become problematic because assembly trimming doesn't like dynamic loads. If you set true, this dynamic loading code in CurrentPlatformEnlightenmentProvider causes a trim analysis warning (IL2057). The warning could safely be ignored, but it shouldn't happen in the first place. This change should stop that warning from emerging.

(Just use new() instead.)

This dynamic load has been unnecessary since commit 40e8696 modified CurrentPlatformEnlightenmentProvider to look for QueryDebugger in the assembly named System.Reactive. Before that, it used to look for one called System.Reactive.Debugger, in which case a dynamic load would have made sense. But since for almost 6 years now, it has been passing "System.Reactive" as the assembly name, there is absolutely no reason for this to be a dynamic load. The code that performs this dynamic load is also in System.Reactive, so the dynamic load is completely pointless.

This only ever happened when the debugger was attached, but it has become problematic because assembly trimming doesn't like dynamic loads. If you set <PublishAot>true</PublishAot>, this dynamic loading code in CurrentPlatformEnlightenmentProvider causes a trim analysis warning (IL2057). The warning could safely be ignored, but it shouldn't happen in the first place. This change should stop that warning from emerging.
@idg10 idg10 self-assigned this Jun 14, 2023
@idg10 idg10 linked an issue Jun 14, 2023 that may be closed by this pull request
@idg10 idg10 marked this pull request as ready for review June 14, 2023 08:46
@idg10 idg10 merged commit 95d9ea9 into main Jun 14, 2023
@idg10 idg10 deleted the feature/1942-remove-dynamic-iqueryservices-load branch June 14, 2023 10:37
idg10 added a commit that referenced this pull request May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AOT compilation produces single trim analysis warning
3 participants