Skip to content
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

Export Version / Unicode in parsing #772

Merged

Conversation

nightkr
Copy link
Member

@nightkr nightkr commented Dec 26, 2021

@nightkr nightkr requested a review from clux December 26, 2021 16:55
@nightkr nightkr self-assigned this Dec 26, 2021
See kube-rs#764 (comment)

Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>
@codecov-commenter

This comment has been minimized.

Copy link
Member

@clux clux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's cleaner, nice use of split_terminator

@clux clux merged commit b5e9a8a into kube-rs:version-export Dec 26, 2021
@nightkr nightkr deleted the version-export-/unicode-parsing branch December 26, 2021 22:08
clux added a commit that referenced this pull request Dec 27, 2021
* 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 <sszynrae@gmail.com>

* remove leftover TODO + improve doc links between discovery and core

Signed-off-by: clux <sszynrae@gmail.com>

* import more tests, fix one, better docs

Signed-off-by: clux <sszynrae@gmail.com>

* a bit less Reverse and less double negatives

Signed-off-by: clux <sszynrae@gmail.com>

* Version export - explicitly request ordering (#767)

* Explicitly request which ordering to use

Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>

* Add `Version::latest` that includes considers v2 > v2beta1 > v1

Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>

* Rename Version::latest_stable to priority

Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>

* Also rename LatestStable accordingly

Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>

* 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 <sszynrae@gmail.com>

* fix self-references and rename semantic to distance

Signed-off-by: clux <sszynrae@gmail.com>

* rename to generation

Signed-off-by: clux <sszynrae@gmail.com>

* We need to split on byte lengths, not code point counts (#772)

See #764 (comment)

Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>

* Apply suggestions from code review

Co-authored-by: Teo Klestrup Röijezon <teo.roijezon@stackable.de>

* Update kube-core/src/version.rs

Co-authored-by: kazk <kazk.dev@gmail.com>

Co-authored-by: Teo Klestrup Röijezon <teo.roijezon@stackable.de>
Co-authored-by: kazk <kazk.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants