Skip to content

:THIS[foobar] **EXPERIMENTAL** #11

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

Open
Lisias opened this issue Apr 21, 2022 · 0 comments
Open

:THIS[foobar] **EXPERIMENTAL** #11

Lisias opened this issue Apr 21, 2022 · 0 comments

Comments

@Lisias
Copy link

Lisias commented Apr 21, 2022

Currently, we have the following Parch Ordering:

  1. Nodes with no operator ('insert') are loaded by the KSP GameDatabase first.
  2. Patches for modname values in NEEDS, BEFORE, AFTER that don't exist are removed.
  3. All patches with :FIRST are applied.
  4. All patches without an ordering directive (:FIRST, :BEFORE, :FOR, :AFTER, :LAST, :FINAL) are applied.
  5. For each item in the Unicode-sorted list of modname values:
    • All patches with :BEFORE are applied
    • All patches with :FOR are applied
    • All patches with :AFTER are applied
  6. All patches with :LAST are applied in order
  7. All patches with :FINAL are applied

On the https://github.com/net-lisias-ksp/MM-FORNEEDS-ProofOfConcept repository, a proposal for a better handling of :FOR was proposed, as well the use of a hypothetical :THIS clausule to make the handling easier.

So the :THIS[foobar] clausule would declares declares the presence of a Add'On (i.e. creates a tag on the Module Manager's set of installed add'ons), and the :FOR[foobar] clausule would loose the ability to declare them but will retain the temporal (ordering) semantic. So 3rd parties could use :FOR[foobar] to allow patching some add'on at the same time the target add'on, and so anyone using :LAST[foobar] would have these patches available avoiding the need to use crappy solutions as :LAST[zzzz-something] on the patch set.

@Lisias Lisias changed the title THIS :THIS[foobar] **EXPERIMENTAL** Apr 21, 2022
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

1 participant