Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Custom step insertion is error-prone #2081

Open

Description

@sbomer

It's quite easy to make mistakes with the custom step MSBuild/command-line and insert them in an unintended order. For example you might write

<_TrimmerCustomSteps Include="$(_TaskAsm)" AfterStep="OutputStep" Type="Xamarin.Linker.RegistrarStep" />
<_TrimmerCustomSteps Include="$(_TaskAsm)" AfterStep="OutputStep" Type="Xamarin.Linker.DoneStep" />

expecting that DoneStep will come last when really this just determines the order of insertions (this actually was the case before #2082). Maybe it would be better to provide a way to insert multiple custom steps at once in a fixed order, similar to SubStepDispatcher (see https://github.com/xamarin/xamarin-android/blob/main/src/Microsoft.Android.Sdk.ILLink/PreserveSubStepDispatcher.cs#L9-L17 for example), but with a list of Steps instead of SubSteps.

This probably isn't worth it just for xamarin-android/xamarin-macios, but we should consider improving this if we ever want the plugin model to become more widely used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions