Make serialization discovery opt-in#2929
Merged
sbomer merged 2 commits intodotnet:mainfrom Aug 1, 2022
Merged
Conversation
vitek-karas
approved these changes
Jul 29, 2022
Member
vitek-karas
left a comment
There was a problem hiding this comment.
Assuming we will go and set this in Xamarin repos ASAP, to make sure we don't break them...
This was referenced Aug 12, 2022
jonathanpeppers
added a commit
to dotnet/android
that referenced
this pull request
Aug 15, 2022
Context: dotnet/linker#2929 Context: https://github.com/dotnet/linker/blob/6e8e139a484f74c524c821c7a4a08287d77257a4/src/ILLink.Tasks/build/Microsoft.NET.ILLink.targets#L227-L229 Fixes: #7256 Serialization heuristics in the .NET 7 linker is now opt-in. We now need to pass a new flag to the linker by default: <_ExtraTrimmerArgs>--enable-serialization-discovery $(_ExtraTrimmerArgs)</_ExtraTrimmerArgs> This might also solve project builds in `Release` mode that appear to hang: Task "ILLink" (TaskId:272) Builds appear to be running this task and never exit. Let's hope this also solves this?
jonathanpeppers
added a commit
to dotnet/android
that referenced
this pull request
Aug 18, 2022
Fixes: #7256 Changes: dotnet/installer@716bd17...f3da421 Changes: dotnet/linker@f09bacf...6252a21 Changes: dotnet/runtime@26a71c6...f52d8c5 Updates: * Microsoft.Dotnet.Sdk.Internal: from 7.0.100-rc.1.22409.23 to 7.0.100-rc.2.22417.1 * Microsoft.NET.ILLink.Tasks: from 7.0.100-1.22377.1 to 7.0.100-1.22415.4 * Microsoft.NETCore.App.Ref: from 7.0.0-rc.1.22403.8 to 7.0.0-rc.1.22411.12 ~~ Other Changes ~~ * Revert `export DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=true`, as the original issue is fixed. * [illink] enable serialization discovery for the linker Context: dotnet/linker#2929 Context: https://github.com/dotnet/linker/blob/6e8e139a484f74c524c821c7a4a08287d77257a4/src/ILLink.Tasks/build/Microsoft.NET.ILLink.targets#L227-L229 Fixes: #7256 Serialization heuristics in the .NET 7 linker is now opt-in. We now need to pass a new flag to the linker by default: <_ExtraTrimmerArgs>--enable-serialization-discovery $(_ExtraTrimmerArgs)</_ExtraTrimmerArgs> * Update `.apkdesc` files for the new `marshal-ilgen` Mono component * [tests] ignore `WarnAboutAppDomains(true)` Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
agocke
pushed a commit
to dotnet/runtime
that referenced
this pull request
Nov 16, 2022
Serialization discovery is an undocumented quirk that exists for back-compat in xamarin scenarios. We turned it on by default in .NET 6, but would like to remove such quirks from the default options in .NET 7. This changes the (undocumented) command-line option to be opt-in. Xamarin SDKs will be expected to pass this option by setting <_ExtraTrimmerArgs>--enable-serialization-discovery</_ExtraTrimmerArgs>. Commit migrated from dotnet/linker@d0ca2a6
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2924
Serialization discovery is an undocumented quirk that exists for back-compat in xamarin scenarios. We turned it on by default in .NET 6, but would like to remove such quirks from the default options in .NET 7.
This changes the (undocumented) command-line option to be opt-in. Xamarin SDKs will be expected to pass this option by setting
<_ExtraTrimmerArgs>--enable-serialization-discovery</_ExtraTrimmerArgs>.