-
Notifications
You must be signed in to change notification settings - Fork 128
Closed
Labels
Description
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:
- Make Pipeline available in the ref assembly so adding steps doesn't require reflection
- Design a new api with the same purpose, and make that available in the ref assembly
- Require shared state to be static on one of the custom steps, and fix The same assembly is loaded multiple times if it passed as multiple --custom-step arguments #1314
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).