-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[trimming]
TrimMode=full
in debug mode, should enable analyzers
For AOT scenarios, projects would set: <PublishAot>true</PublishAot> For both `Debug` and `Release`, this allows you to get the same set of analyzers in both configurations. You'd want to see the same warnings for both. For Android, the project template is currently doing: <PropertyGroup Condition="'$(Configuration)' == 'Release'"> <TrimMode>Full</TrimMode> </PropertyGroup> But this would result in a *different* set of warnings between `Debug` and `Release` mode! Instead, we can do: <PropertyGroup> <TrimMode>Full</TrimMode> </PropertyGroup> And then add a new default, such as: <EnableTrimAnalyzer Condition="'$(EnableTrimAnalyzer)' == '' and '$(TrimMode)' == 'full'">true</EnableTrimAnalyzer> `TrimMode=Full` does *not* enable the trimmer, so other defaults in `Debug` should remain unchanged. So, the new behavior is: * `Configuration=Debug` * `PublishTrimmed=false` (default, no trimmer) * `TrimMode=Full` (project template) * `EnableTrimAnalyzer=true` (new default) * You get the same warnings in `Debug` and `Release` mode. I also reworded the commend in the project template slightly, to mention it enables analyzers.
- Loading branch information
1 parent
8bb3c8e
commit d62de7d
Showing
4 changed files
with
10 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters