serpent-os/moss

moss: Registry sort is invalid

Closed this issue · 3 comments

See: https://github.com/serpent-os/libmoss/blob/main/source/moss/deps/registry/item.d#L38

The sort order (as a multi sort) is actually plugin priority, then release. Note this ensures that highest plugin with matching provider name always wins as well as ensuring highest release within a set wins (to eliminate duplicates in a single provider)

There is a potentially related issue when doing install which might actually be installs fault for not hitting the right plugin, the sorting is inverse.

So the CLI suspicion was correct, we just need to ensure we're bulletproof with the multisort going forward to prevent any demons cropping up down the road!

I think we can close this? We explicitly sort on plugin priority descending when querying the registry and I don't believe there's any known gap here.