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

Get rid of Version type complications #280

Open
stanislav-tkach opened this issue Nov 8, 2021 · 2 comments
Open

Get rid of Version type complications #280

stanislav-tkach opened this issue Nov 8, 2021 · 2 comments

Comments

@stanislav-tkach
Copy link
Owner

stanislav-tkach commented Nov 8, 2021

Perhaps representing a version with the enum was a mistake. Now I think that Option<String> is enough. I'm not sure if it is worth one more breaking change (4.0?), though.

@ydirson
Copy link
Contributor

ydirson commented Oct 24, 2023

It is definitely useful to be able to parse a version to extract major/minor (maybe only to feed to legacy APIs).
But different OS have different conventions (think FreeBSD's 13.2-RELEASE).

The constraint would be, how we can go on providing an API to easily extract major/minor if any. Maybe a Version::get_major_minor() method, with a match statement on os type to delegate to various version parsers?

@stanislav-tkach
Copy link
Owner Author

@ydirson I really like your idea. Perhaps it would be the best middle ground: to store version as a string and have a bunch of methods to (try to) extract more specific information.

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

No branches or pull requests

2 participants