Treat AVC min without max as open range #2571
Merged
+17
−3
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.
Problem
A .version file containing this:
Is resulting in this metadata:
The minimum value is essentially ignored.
Cause
The KSP-AVC spec says:
Version of KSP that the add-on was made to support.
Minimum version of KSP that the add-on supports.
Requires KSP_VERSION field to work.
Maximum version of KSP that the add-on supports.
Requires KSP_VERSION field to work.
This implies that if you want to specify
KSP_VERSION_MIN
, you must specifyKSP_VERSION
. This does not make sense, but it's in the spec, and some modders may feel compelled to follow it strictly as written.Under that interpretation, if you wanted to specify "all versions after 1.5.0", you would create a file as shown above, but it would not translate into equivalent CKAN metadata. This is because the
KSP_VERSION
value is used as a fallback for both the min and the max if either are absent:CKAN/Netkan/Transformers/AvcTransformer.cs
Lines 112 to 115 in f641e20
Changes
Now if a .version file has
KSP_VERSION_MIN
andKSP_VERSION
but notKSP_VERSION_MAX
, we don't setksp_version_max
. (And vice versa forMAX
andMIN
.)