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

replace some code by https://crates.io/crates/version-compare #4606

Open
sylvestre opened this issue Mar 24, 2023 · 1 comment
Open

replace some code by https://crates.io/crates/version-compare #4606

sylvestre opened this issue Mar 24, 2023 · 1 comment

Comments

@sylvestre
Copy link
Contributor

https://github.com/uutils/coreutils/blob/main/src/uucore/src/lib/mods/version_cmp.rs#L57 could be replaced by the crate.

See:
#4325
And:
timvisee/version-compare#27

@tertsdiepraam
Copy link
Member

tertsdiepraam commented Mar 24, 2023

I'm not convinced this is a good idea. The version sort is very specific in GNU, so compatibility requires us to be very precise here. Our current implementation is also quite good. Maybe we could spin our version into a separate crate instead? Our version also does not allocate a Vec per version like that crate (https://github.com/timvisee/version-compare/blob/master/src/version.rs#L33). We should at least measure whether there is a performance difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants