Fix nullable Func delegate, whitespace, and csproj comment in PostTrimmingPipeline#10981
Conversation
…ated csproj comment Co-authored-by: sbomer <787361+sbomer@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the post-trimming pipeline implementation in Xamarin.Android.Build.Tasks to align nullable delegate signatures, improve robustness when resolving System.Private.CoreLib, and keep the project file’s linker-source documentation accurate.
Changes:
- Add
AssemblyResolutionExceptionhandling aroundresolver.Resolve("System.Private.CoreLib")inPostTrimmingPipeline. - Update corlib factory delegate types from
Func<AssemblyDefinition>toFunc<AssemblyDefinition?>in the post-trimming keep-alives path, plus minor whitespace cleanup. - Refresh the
.csprojcomment describing which linker sources are included.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Xamarin.Android.Build.Tasks/Tasks/PostTrimmingPipeline.cs |
Adds try/catch + error logging for corlib resolution used by post-trimming keep-alives. |
src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/PostTrimmingAddKeepAlivesStep.cs |
Updates the corlib factory delegate type to nullable to match new behavior. |
src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/AddKeepAlivesHelper.cs |
Propagates nullable delegate return type through helper methods and fixes indentation. |
src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj |
Updates comment documenting linker source inclusions for build tasks. |
|
@copilot apply changes based on the comments in this thread |
…esolution attempts Co-authored-by: sbomer <787361+sbomer@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/android/sessions/399b2f01-0576-42f4-a1d4-d0f0d31f5eb7
Applied in commit e6b2e5b. The corlib resolution is now memoized using a |
PostTrimmingPipeline.csusing acorlibResolutionAttemptedflag andcorlibAssemblylocal so resolution and error logging happen at most once per task execution📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.