CommunityToolkit / CommunityToolkit/dotnet

Trimming warning for ObservableRecipient.IsActive is useless, and AOT warning is not helpful

Open
#1,123 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
3.8k
Forks
400
PR merge metrics
No merged PRs in 30d

Description

The warning for ObservableRecipient.IsActive when using trimming does not contain any actionable info, and only warns about potential performance loss. Which means, in 99% of cases, it will be immediately suppressed. The warning should be removed and the performance implications of trimming should be documented elsewhere.

Additionally, the AOT warning should be smarter. It shows up and tells you it is AOT safe if `__IMessengerExtensions` is not trimmed, however there is no obvious way for a developer to know that. The source generator should force it to be rooted by itself, and this warning should be removed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.