Move RemoveResourceDesignerStep out of ILLink process#11039
Open
Move RemoveResourceDesignerStep out of ILLink process#11039
Conversation
…ngPipeline Migrate RemoveResourceDesignerStep out of the ILLink custom step pipeline and into PostTrimmingPipeline so it runs as an IAssemblyModifierPipelineStep after trimming. This follows the same pattern as FixLegacyResourceDesignerStep. - Add IAssemblyModifierPipelineStep to RemoveResourceDesignerStep - Add constructor accepting assemblies list and logging delegate - Remove GetAssembliesStep (no longer needed; assemblies passed directly) - Remove both _TrimmerCustomSteps entries from targets - Add AndroidLinkResources property to PostTrimmingPipeline task
Contributor
There was a problem hiding this comment.
Pull request overview
Moves RemoveResourceDesignerStep out of the ILLink custom step pipeline and into the PostTrimmingPipeline MSBuild task so it runs after trimming as an IAssemblyModifierPipelineStep, aligning with other post-trim steps.
Changes:
- Add
AndroidLinkResourcessupport toPostTrimmingPipelineand runRemoveResourceDesignerStepwhen enabled. - Refactor
RemoveResourceDesignerStepto implementIAssemblyModifierPipelineStepand accept an explicit assemblies list + logging delegate. - Remove the ILLink-side plumbing (
GetAssembliesStep, ILLink csproj inclusion, and_TrimmerCustomStepsregistrations in targets).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Xamarin.Android.Build.Tasks/Tasks/PostTrimmingPipeline.cs | Adds AndroidLinkResources flag and invokes RemoveResourceDesignerStep post-trim. |
| src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.TypeMap.LlvmIr.targets | Removes ILLink custom steps and wires AndroidLinkResources into PostTrimmingPipeline. |
| src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/RemoveResourceDesignerStep.cs | Converts step to IAssemblyModifierPipelineStep and removes ILLink config dependency. |
| src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj | Stops compiling/linking RemoveResourceDesignerStep into the ILLink project. |
| src/Microsoft.Android.Sdk.ILLink/GetAssembliesStep.cs | Deletes unused ILLink step previously used to collect assemblies for the designer step. |
…esolver calls Load all assemblies into a shared list upfront so that RemoveResourceDesignerStep and the per-assembly processing loop operate on the same AssemblyDefinition instances instead of calling resolver.GetAssembly() twice for each assembly.
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.
Migrate RemoveResourceDesignerStep out of the ILLink custom step pipeline and into PostTrimmingPipeline so it runs as an IAssemblyModifierPipelineStep after trimming. This follows the same pattern as FixLegacyResourceDesignerStep.
Trying as an alternative to #10977.