-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
Fixing version sorting of _ vs . #1554
Conversation
Tested this some, and it does correctly bring forward the correct version for NavUtils. It also brings forth Deep Space Utilities properly which closes KSP-CKAN/CKAN-meta#919. This also addresses many cases of #1327. @politas as you've been poking around with sorting for a little while, would you mind trying the build out to see if it generates and/or fixes any outstanding issues? (.zip with debug for convenience, you can just extract the folder and run ckan.exe) |
I found another example that could possibly break the versioning. I've updated this PR to solve that scenario too.
I added a test for the uneven version lengths (1.1.0.0 vs 1.1.1) and fixed the case where a patch number could cause the sort to fail (for example, if there had been a 1.0.1 version in the list above). |
Ok, I'm trying to use that version, but I don't seem to be getting any updates to metadata when I refresh using it. NavUtilities 0.5.1_RC_1_repacked does show up as the latest version, but its saying its Max KSP is v1.0.4, and since the CKAN file for that version definitely says 1.0.5 now, I can't trust that I'm properly testing anything. Is there a way to clear the local CKAN metadata store while not losing the installed mods data? |
@politas Could you please try refreshing again? The NavUtilities metadata is up-to-date for me when I refresh. |
Ok. Looks fine. The few remaining cases where it's picking up obsoleted versions are not ones that a _/. sorting change will fix. Hasn't created any issues I can see. |
I can also confirm that this works as intended, it shows the correct version. |
The NavUtilities versions were not being sorted properly. Currently the sort is
It should be
This change modifies the sort so that '.' takes precedence over all other non-digit characters. That way version parts are considered higher than other random characters tacked onto the end of the version.
All the other version tests pass.