Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Sigma88 opened this issue Feb 12, 2018 · 17 comments
Closed

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

Sigma88 opened this issue Feb 12, 2018 · 17 comments
Assignees

Comments

@Sigma88
Copy link

Sigma88 commented Feb 12, 2018

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:

  • firstly, all pass specifiers without :FINAL are run following standard rules
  • then, all the pass specifiers with :FINAL are run alphabetically
  • finally, all patches that have only :FINAL are run

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
Copy link
Author

Sigma88 commented Feb 12, 2018

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

@blowfishpro
Copy link
Collaborator

What about :FINAL[myMod]

@Sigma88
Copy link
Author

Sigma88 commented Feb 12, 2018

Yeah that works fine for me if it's easier to implement 👍

@sarbian
Copy link
Owner

sarbian commented Feb 12, 2018

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

@Sigma88
Copy link
Author

Sigma88 commented Feb 12, 2018

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
Copy link
Collaborator

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
Copy link
Author

Sigma88 commented Feb 12, 2018

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

@sarbian
Copy link
Owner

sarbian commented Feb 12, 2018

Yes, LAST may lower the risk of confusion

@Sigma88
Copy link
Author

Sigma88 commented Feb 13, 2018

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

it would just be a simple alphabetical ordering right?

@blowfishpro
Copy link
Collaborator

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

@blowfishpro blowfishpro changed the title [FeatureRequest] :FINAL improvement [FeatureRequest] :LAST[mod] pass that runs right before :FINAL Apr 6, 2018
@blowfishpro
Copy link
Collaborator

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.

blowfishpro added a commit that referenced this issue Apr 6, 2018
Addresses #96

Not to be confused with the popular password manager
@Sigma88
Copy link
Author

Sigma88 commented Apr 6, 2018

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
Copy link
Author

Sigma88 commented Nov 9, 2018

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
Copy link
Collaborator

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
Copy link
Collaborator

This is done

@Sigma88
Copy link
Author

Sigma88 commented Aug 7, 2019

Thanks!

@zekew11
Copy link

zekew11 commented May 10, 2020

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.

blowfishpro added a commit that referenced this issue Jul 6, 2020
Per the original feature design (#96) it should still run
@blowfishpro blowfishpro mentioned this issue Jul 7, 2020
Lisias pushed a commit to KSP-ModularManagement/ModuleManager that referenced this issue Jul 11, 2020
Per the original feature design (sarbian#96) it should still run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants