Implements a Warning when a :FOR identifier is also mentioned on the :NEEDS#187
Draft
Lisias wants to merge 1 commit intosarbian:masterfrom
Draft
Implements a Warning when a :FOR identifier is also mentioned on the :NEEDS#187Lisias wants to merge 1 commit intosarbian:masterfrom
:FOR identifier is also mentioned on the :NEEDS#187Lisias wants to merge 1 commit intosarbian:masterfrom
Conversation
…ntioned on a `:NEEDS` on the same patch.
Author
|
Not every occurrence of I'm testing the solution, and will add a commit with it once it's proven to work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It was (finally) realized that
:NEEDSdoesn't completely inhibits:FOR, as it creates an identifier in thetagListeven when:NEEDSis not satisfied.This leaded to confusion more than one time, being one of oldest I found this one, from 2015:
https://github.com/ferram4/Ferram-Aerospace-Research/blame/787a30bc9deab0bde87591f0cc973ec3b0dd2de9/GameData/FerramAerospaceResearch/FerramAerospaceResearch.cfg#L303
It's subtle, but this patch in special does not cause trouble because its
:FORwould unconditionally create an entry on thetagListfor an add'on's identifier that already exists due the directory name having the same name, so no harm is done.But exactly by being subtle, some people didn't grasped this counter-intuitive behaviour - what can lead to undesired collateral effects on patches that aims to be applied to an specific before anyone else using
:AFTER, but not before anyone using:BEFORE, a use case where using:FORis tempting.This pull requests add's a Warning when it detects a
:NEEDSusing the same name used on:FOR, and I expect it to help prevent some unintended borkage on the field.