Implements a Warning when a :FOR
identifier is also mentioned on the :NEEDS
#187
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
:NEEDS
doesn't completely inhibits:FOR
, as it creates an identifier in thetagList
even when:NEEDS
is 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
:FOR
would unconditionally create an entry on thetagList
for 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:FOR
is tempting.This pull requests add's a Warning when it detects a
:NEEDS
using the same name used on:FOR
, and I expect it to help prevent some unintended borkage on the field.