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

Add correct semantic version support #726

Closed
terrillmoore opened this issue May 3, 2021 · 0 comments
Closed

Add correct semantic version support #726

terrillmoore opened this issue May 3, 2021 · 0 comments
Assignees

Comments

@terrillmoore
Copy link
Member

Semantic versions require that the fourth field compare slightly differently. If blank, a version number is greater than the same version with a non-blank field. Those with non-blank fields compare more or less as expected. We have been using a 32-bit number with 8-bit fields, and all is well except comparing e.g 3.0.01 to 3.0.0.0 -- 3.0.0.0 is greater than 3.0.0.1. The sequence is:

3.0.0.1 < ... < 3.0.0.255 < 3.0.0.0

We will adopt semver, and use a '-' instead of a '.' in the third separator:

3.0.0-1 < ... < 3.0.0-255 < 3.0.0

We'll add some macros to simplify use (ARDUINO_LMIC_VERSION_IS_GE(a, b), etc.).

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

1 participant