Skip to content

Move RemoveResourceDesignerStep out of ILLink process - #11039

Merged
jonathanpeppers merged 5 commits into
mainfrom
dev/sbomer/remove-resource-designer-v2
Apr 3, 2026
Merged

Move RemoveResourceDesignerStep out of ILLink process#11039
jonathanpeppers merged 5 commits into
mainfrom
dev/sbomer/remove-resource-designer-v2

Conversation

@sbomer

Copy link
Copy Markdown
Member

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

Trying as an alternative to #10977.

…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
CopilotAI review requested due to automatic review settings March 27, 2026 18:25

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AndroidLinkResources support to PostTrimmingPipeline and run RemoveResourceDesignerStep when enabled.
  • Refactor RemoveResourceDesignerStep to implement IAssemblyModifierPipelineStep and accept an explicit assemblies list + logging delegate.
  • Remove the ILLink-side plumbing (GetAssembliesStep, ILLink csproj inclusion, and _TrimmerCustomSteps registrations 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
FileDescription
src/Xamarin.Android.Build.Tasks/Tasks/PostTrimmingPipeline.csAdds AndroidLinkResources flag and invokes RemoveResourceDesignerStep post-trim.
src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.TypeMap.LlvmIr.targetsRemoves ILLink custom steps and wires AndroidLinkResources into PostTrimmingPipeline.
src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/RemoveResourceDesignerStep.csConverts step to IAssemblyModifierPipelineStep and removes ILLink config dependency.
src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csprojStops compiling/linking RemoveResourceDesignerStep into the ILLink project.
src/Microsoft.Android.Sdk.ILLink/GetAssembliesStep.csDeletes 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.
…ner-v2
# Conflicts:
#	src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/RemoveResourceDesignerStep.cs
@sbomersbomer self-assigned this Mar 30, 2026
Resolve conflict in PostTrimmingPipeline.cs by keeping both the
RemoveResourceDesignerStep (from this PR) and the
PostTrimmingFixAbstractMethodsStep (from main).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers
jonathanpeppers merged commit de61ef1 into mainApr 3, 2026
6 checks passed
@jonathanpeppers
jonathanpeppers deleted the dev/sbomer/remove-resource-designer-v2 branch April 3, 2026 17:13
@github-actionsgithub-actionsBot locked and limited conversation to collaborators May 4, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@sbomer@jonathanpeppers