Custom step insertion is error-prone
- Dominant language
- C#
- Stars
- 392
- Forks
- 128
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 2
Description
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
```xml
<_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 https://github.com/mono/linker/pull/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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.