Only disable StartupHookSupport in non-Debug builds; remove MetadataUpdaterSupport from ILLink.targets#126546
Only disable StartupHookSupport in non-Debug builds; remove MetadataUpdaterSupport from ILLink.targets#126546
Conversation
…taUpdaterSupport from ILLink.targets; add tests Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/64db1ca8-95d8-47be-90ab-be736ed09ab0 Co-authored-by: tmat <41759+tmat@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/64db1ca8-95d8-47be-90ab-be736ed09ab0 Co-authored-by: tmat <41759+tmat@users.noreply.github.com>
|
Tagging subscribers to this area: @agocke, @dotnet/illink |
|
If we do this change, there will be a warning when publishing debug: Are we okay with that? These are the intentional warnings that we put in place so that people are warned the feature will not work. We could suppress the intentional warning in Corelib, but that breaks the promise that no warnings means the app will work the same with or without trimming. I really wonder whether we should just introduce a private mechanism for this that corelib can check for in addition to StartupHookSupport and do something so we can still trim this when publishing. Cc @dotnet/illink |
… SDK repo) Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/cd190b57-5e06-418f-8965-c8029d4efe8a Co-authored-by: tmat <41759+tmat@users.noreply.github.com>
|
@MichalStrehovsky We discussed options in #123778. Specifically comments #123778 (comment) and #123778 (comment). What about updating Actually, I just found that there is a concept of Unfortunately, it looks like @agocke is that intentional? It would make more sense the other way around. |
I saw that, but I didn't see the warnings discussed. Warnings like this are problematic because it's a bad UX and people love to do WarningsAsErrors, then forget they set it and never think about it again, and get completely blocked by a relatively harmless warning. It feels like what we need is to make this line conditional somehow: Would BuildingInsideVisualStudio property work (would it be set when doing publish in the VS UI)? Would we need something else for |
No, we don't want to use any such property. |
|
Filed #126606 |
|
@elinor-fung for runtimeconfig/runtimeconfig.dev.json question |
Microsoft.NET.ILLink.targetswas unconditionally disablingStartupHookSupportandMetadataUpdaterSupportfor all trimmed/AOT builds, blocking Hot Reload in Debug AOT apps and overriding the SDK's correct per-configuration handling ofMetadataUpdaterSupport.Description
Microsoft.NET.ILLink.targetsStartupHookSupport: addedand '$(Configuration)' != 'Debug'to the condition — startup hooks (and thus Hot Reload) are preserved in Debug buildsMetadataUpdaterSupport: removed entirely — the SDK (Microsoft.NET.Sdk.targets) already sets this tofalsefor non-Debug builds; ILLink.targets was erroneously overriding that in DebugNo test changes are included — per reviewer guidance, this kind of MSBuild targets testing is done in the SDK repo.