Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom step insertion is error-prone #2081

Open
sbomer opened this issue Jun 4, 2021 · 0 comments
Open

Custom step insertion is error-prone #2081

sbomer opened this issue Jun 4, 2021 · 0 comments

Comments

@sbomer
Copy link
Member

sbomer commented Jun 4, 2021

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
Projects
None yet
Development

No branches or pull requests

2 participants