Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export Version priority parser with Ord impls in kube_core (#764)
* Export Version parser with Ord impl in kube_core doing the cleanup steps described to make this worthy of exporting. needed for kube-rs/kopium#23 Signed-off-by: clux <[email protected]> * remove leftover TODO + improve doc links between discovery and core Signed-off-by: clux <[email protected]> * import more tests, fix one, better docs Signed-off-by: clux <[email protected]> * a bit less Reverse and less double negatives Signed-off-by: clux <[email protected]> * Version export - explicitly request ordering (#767) * Explicitly request which ordering to use Signed-off-by: Teo Klestrup Röijezon <[email protected]> * Add `Version::latest` that includes considers v2 > v2beta1 > v1 Signed-off-by: Teo Klestrup Röijezon <[email protected]> * Rename Version::latest_stable to priority Signed-off-by: Teo Klestrup Röijezon <[email protected]> * Also rename LatestStable accordingly Signed-off-by: Teo Klestrup Röijezon <[email protected]> * rename latest to semantic for language consistency we had two orders ::latest and ::priority, but v.latest() was a ambiguous. v.latest could mean: - we are sorting by age (but that's not true) - we are sorting by latest version in semver semantics (true so think v.semantic() is slightly more clear. v2.semantic() > v1.semantic() feels a little easier to comprehend than v2.latest() > v1.latest() Signed-off-by: clux <[email protected]> * fix self-references and rename semantic to distance Signed-off-by: clux <[email protected]> * rename to generation Signed-off-by: clux <[email protected]> * We need to split on byte lengths, not code point counts (#772) See #764 (comment) Signed-off-by: Teo Klestrup Röijezon <[email protected]> * Apply suggestions from code review Co-authored-by: Teo Klestrup Röijezon <[email protected]> * Update kube-core/src/version.rs Co-authored-by: kazk <[email protected]> Co-authored-by: Teo Klestrup Röijezon <[email protected]> Co-authored-by: kazk <[email protected]>
- Loading branch information