It should be possible to use multiple custom steps with shared state. The way xamarin-android does this is:
- Register a single custom step (SetupStep) via --custom-step
- SetupStep creates multiple new steps, some with shared state
- SetupStep uses reflection to add these steps to the linker pipeline
We should provide a way to share state that doesn't require such workarounds. Some options are:
If we disallow shared state, then xamarin-android could work around it by grouping steps with shared state together, but this isn't the best for code organization, and means that these steps will run in order, without other steps in-between (limiting what custom steps can do without more workarounds).
It should be possible to use multiple custom steps with shared state. The way xamarin-android does this is:
We should provide a way to share state that doesn't require such workarounds. Some options are:
If we disallow shared state, then xamarin-android could work around it by grouping steps with shared state together, but this isn't the best for code organization, and means that these steps will run in order, without other steps in-between (limiting what custom steps can do without more workarounds).