Closed robojumper closed 3 years ago
If I understood correctly, you are using same output processing for HL cook and assets cook. If that's the case, I think it's a bad idea (if not outright wrong); for example, assets cook does not care about what happens with native script packages (and if a way is found, it would prefer to not have them participate in the cooking process entirely), while the HL cook actually needs and cares about those packages (even though the 2 in question aren't shipped by CHL right now)
One thing that I would like to see (and I dunno if that's possible or not, my knowledge of powershell is pretty limited) is for the callback handlers to be passed as delegates to _InvokeEditorCmdlet
, instead of being huge switch
blocks. It would probably also help with addressing the previous comment
Instead of messing around with callbacks, the latest commit instead just uses a plain old object and inheritance to handle stdout parsing, rewriting and crash detection. This looks a fair bit nicer.
Use a unified function to manage process events and crash detection.
Also removes _Compiletest because this is implemented as a pre-make hook in X2CommunityCore/X2WOTCCommunityHighlander#991.