How does AYON handles bundle version sorting order?

This is a question we’ve been wondering internally for a while.
We are following the convention of having the base version of a bundle + our internal version numbered right after that.

However, the sorting order seems all over the place past the +.
Following the Discord discussions, we are not using dashes (-) since they are treated as pre-release tags if I recall correctly. But what gives with the order of our own version?

We have accidentally added the wrong addon version in a bundle before for missing the newest version amongst all the other ones, so I wanted to understand better how this works, or if it is a bug, etc.

Any thoughts will be greatly appreciated.
Thank you!

The version ordering is using Semantic Versioning.

Technically everything after the + according to semver should not define any ordering precedence, and as such should not be relevant for sorting. There was a big debate about that at some point and hence we follow semver exactly.

However, I totally agree that it’s just annoying for these cases and we’re better of doing a “semver” + alphabetical sort where the alphabetical sort helps us where semver stops.

I believe we’re currently using semver.rcompare. Potentially using semver.compareBuild might improve things.

Created a PR Include `build` in semver version comparison by BigRoy · Pull Request #1082 · ynput/ayon-frontend · GitHub

2 Likes

This should now have been improved with the new server release 1.7.5 in frontend.

Would be great if you could give it a test run.

2 Likes

@BigRoy Thank you for the explanation and the update in the frontend!

We will try to test this out as soon as possible, and I’ll post any feedback here!

Many thanks for this - it was really brutal on the eyes without build sorting

2 Likes

Heyy @BigRoy we just updated to the latest frontend, and this new version sorting is way better! Thank you for that :slight_smile:

For reference, here is how the sort appears after the update. It’s way more intuitive now

1 Like