sarbian / ModuleManager

177 stars 96 forks source link

[FeatureRequest] :LAST[mod] pass that runs right before :FINAL #96

Closed Sigma88 closed 5 years ago

Sigma88 commented 6 years ago

I was going to ask for a new pass specifier that ran just before :FINAL

but then I thought, would it be possible to allow both a normal pass specifier and :FINAL to be used?

with the effect that:

this will not change how current patches are applied, but open up a second pass of patches.

this would remove the need of using :FOR[zzzzzzMyMod] and should be pretty easy to implement into the current code

Sigma88 commented 6 years ago

I don't mind taking a shot at it myself if you like the idea but don't want to write it yourself

blowfishpro commented 6 years ago

What about :FINAL[myMod]

Sigma88 commented 6 years ago

Yeah that works fine for me if it's easier to implement :+1:

sarbian commented 6 years ago

As long as we don't start a race to the FINALer modifier I am fine with it.

Sigma88 commented 6 years ago

I only proposed it because people are already running at the most Zful mod :D

if you feel like this would not add anything to the mod I'm fine with not getting this feature

blowfishpro commented 6 years ago

Now that I think about this a bit it would probably make sense to name it something else to avoid confusion. Maybe :CLEANUP[xxx] or :LAST[xxx]

Sigma88 commented 6 years ago

my initial idea was :LAST so that works well for me 👍

sarbian commented 6 years ago

Yes, LAST may lower the risk of confusion

Sigma88 commented 6 years ago

in your idea, :LAST[XXX] would not be integrated into the :FOR system?

it would just be a simple alphabetical ordering right?

blowfishpro commented 6 years ago

All patches marked :LAST[xxx] would run right before the :FINAL pass, in alphabetical order.

blowfishpro commented 6 years ago

Oh, one more thing, should :LAST[xxx] act like :BEFORE[xxx] and :AFTER[xxx] in that it will only run if mod xxx is present? Leaning toward yes, but wanted to get some input.

Sigma88 commented 6 years ago

no I think it should be analogue to :FOR so that people can use it instead of :FOR[zzzzzzwhatever]

but it shouldn't add a mod definition. so if I do :LAST[SigmaBinary] the patch will apply regardless of SigmaBinary being installed, but if there is no :FOR[SigmaBinary] or no "SigmaBinary.dll" other patches using ":NEEDS[SigmaBinary]" will still fail

Sigma88 commented 5 years ago

Hi guys, I've been out of the loop for a while, is there any news on this?

if you need help testing/coding feel free to let me know

blowfishpro commented 5 years ago

I did some work on it, then backed up to do some refactoring that would make it simpler. I can probably go back and re-work that now that the refactoring is done.

blowfishpro commented 5 years ago

This is done

Sigma88 commented 5 years ago

Thanks!

zekew11 commented 4 years ago

I was looking for documentation on this feature and this exchange is sufficient, but took some digging to find; mostly because "last" is such a poor search term. The patch ordering wiki page acknowledges the LAST pass but doesn't describe that it is analogous to the FOR pass. I'd be happy to write in an update for the page, but don't want to speak imprecisely about code I didn't write if the convention is that contributors write the doc.