I think I understand where I went wrong with some of the design I've been working with, but I want to make sure I don't cause myself even more problems trying to deal with it.
Basically, right now, I have a class called command.Metadata, which is parametric over installer types, and I think I actually need to make it just accept any installer type. It's already supposed to have the groundwork for this in there, sort of. Now, what this is going to mean is that I need to redo the placeholder filling-in. Here's how that looks, I think:
- Two different functions for filling in an executable. One is strictly typed, and operates unconditionally. This is what is currently used everywhere. The other one needs to be loosely typed, and to take an additional parameter to condition whether to replace or not. Basically, if that parameter matches what's in the executable exactly, then do the replacement. Otherwise, leave it be.
- The command.Metadata class (which probably needs a new name) is no longer parametric.
Okay, I did a bunch more work, some of it focused around undoing stuff I did before. There's more work where that come from, and I need to think about some things.
Like, now that I'm just doing replacements at the level of one PathWith, should I be using combine at the... Wait, I'm already doing what I was considering doing. Okay, this code is a little bit of a rat's nest.
Or I could get distracted and just do it.
At the very least, the various checks all pass, except for the one that I didn't expect to.
I'll leave things like actually testing this new code for later. For now, I'm going to be glad that I seem to have pulled this together, and hopefully improved the design of this part of the code.