Weird semantics for custom action scheduling in wixl
Currently, scheduling CustomActions using Before has some wildly different semantics when compared to Wix Toolset. In WiX Toolset, scheduling an action before another results in that action being scheduled "just before" that action. For instance, the following code:
<CustomAction
Id="customaction"
Property="SET_THIS_PROPERTY"
Value='TO_THIS_VALUE'
/>
<InstallExecuteSequence>
<Custom Action="customaction" Before="ValidateProductID">
(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
</Custom>
</InstallExecuteSequence>
Will be scheduled right before ValidateProductID - e.g. it will have a Sequence ID of 699 (when ValidateProuductID has a Sequence ID of 700).
The current algorithm, however, will give our action the Sequence ID 1, which is unlikely to be what the user wants. I don't have a very clear idea of what a better idea would be right now, but I think we'd probably want to start from the "fixed" action sequences. Then for each unscheduled action that is ready for scheduling (that is, depend on a scheduled action), simply take the "closest" sequence number available before/after its dependency.
I believe this would be closer to what WiX toolset does, and should further reduce diffs between the two generators.