Skip to content
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

Loop to find max KSP version instead of assuming ordering #2131

Merged
merged 2 commits into from
Oct 14, 2017

Conversation

HebaruSan
Copy link
Member

As per KSP-CKAN/NetKAN#5945, the "Max KSP version" column is inaccurate for 3-4% of indexed mods:

  • if the wrong version is chosen as "latest"
  • if the compatible scope of the versions isn't coherent over time

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.

@Olympic1 Olympic1 added Core (ckan.dll) Issues affecting the core part of CKAN Enhancement New features or functionality labels Oct 13, 2017
@politas politas merged commit 4369fb0 into KSP-CKAN:master Oct 14, 2017
@politas
Copy link
Member

politas commented Oct 14, 2017

Ooh, very nice! This has bugged me for a very long time! #1327 was closed without actually fixing the problem entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core (ckan.dll) Issues affecting the core part of CKAN Enhancement New features or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants