Loop to find max KSP version instead of assuming ordering #2131
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.
As per KSP-CKAN/NetKAN#5945, the "Max KSP version" column is inaccurate for 3-4% of indexed mods:
This can discourage users from trusting this column, which is a problem because it should be a main tool for a common task: Determining whether it's safe to update the game.
This code change updates the column to show the actual maximum KSP version across all versions of each mod. The simplest possible strategy is used: loop over the versions and compare. The version ordering problems, accumulated bad metadata, and a few other related issues should still be addressed, so I don't consider this to be a complete fix for that issue, but now at least the column will be reliable.
Additional change to call out for transparency: The "min_version+" format is dropped and displayed the same as the unbounded case. If there's a use case for this, it would be best addressed by showing a true range or list rather than making the code and display confusing for maximums.