Closed mrcjkb closed 7 months ago
🤔 We should probably group and filter the platforms that can be sorted...
Is there a very concrete problem that could occur here? As long as there isn't I believe we'll be fine (famous last words). Or, in other words, as long as the more specific matches appear before the less specific matches, we don't really care about what order the rest will be in, right?
Is there a very concrete problem that could occur here? As long as there isn't I believe we'll be fine (famous last words). Or, in other words, as long as the more specific matches appear before the less specific matches, we don't really care about what order the rest will be in, right?
The problem is that we don't have control over the order in which the rockspec specifies the platform overrides. If it has non-orderable platforms between the orderable ones, we can't sort them properly.
Perhaps we really should then partition the vector into specialized platforms and the regular platforms and just chain them together after the fact (such that the specialized platforms are guaranteed to be at the front). I'm pretty sure itertools has some crazy function to do all of that in one go :joy:
Perhaps we really should then partition the vector into specialized platforms and the regular platforms and just chain them together after the fact (such that the specialized platforms are guaranteed to be at the front). I'm pretty sure itertools has some crazy function to do all of that in one go 😂
It ended up being a lot simpler :smile:
It really shouldn't have an
Ord
instance.I'm not sure about how we sort platforms by specificity (see the comment I added).