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

No automatic update to latest RC on nightly builds #1318

Closed
3 tasks done
Lorandil opened this issue Aug 11, 2022 · 1 comment · Fixed by #1326
Closed
3 tasks done

No automatic update to latest RC on nightly builds #1318

Lorandil opened this issue Aug 11, 2022 · 1 comment · Fixed by #1326
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project

Comments

@Lorandil
Copy link

Describe the request

To confirm a problem I had to swap to the nightly builds on my tinker PC.
Yesterday I was offered an update to RC9.2 on my other PC, but not on the tinker PC
with a nightly build that was older than RC9.2.

I would expect to be offered the newer release even when I'm on a nightly version.

Describe the current behavior

Install a nightly build (I used 20220806) prior to RC9.2, no auto update will happen,
even after manual checking for updates.

Arduino IDE version

Arduino IDE 2.0.0-rc9.1 nightly

Operating system

Windows

Operating system version

10 21H2

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details
@Lorandil Lorandil added the type: enhancement Proposed improvement label Aug 11, 2022
@Lorandil Lorandil changed the title No automatic update to latest RC on older nightly builds No automatic update to latest RC on nightly builds Aug 11, 2022
@per1234
Copy link
Contributor

per1234 commented Aug 12, 2022

Thanks for your report @Lorandil. I investigated and discovered the cause of the bug is that the format of the nightly build versions causes them to be considered higher than the release versions according to semver:

https://semver.org/#spec-item-11

  1. Precedence for two pre-release versions with the same major, minor, and patch version MUST be determined by comparing each dot separated identifier from left to right until a difference is found as follows:

Identifiers consisting of only digits are compared numerically.

Numeric identifiers always have lower precedence than non-numeric identifiers.

A larger set of pre-release fields has a higher precedence than a smaller set, if all of the preceding identifiers are equal.

This means that even though the following example set of versions were released in this chronological order (ascending):

  1. 2.0.0-rc8-nightly-20220718
  2. 2.0.0-rc9
  3. 2.0.0-rc9-nightly-20220722
  4. 2.0.0-rc9.1
  5. 2.0.0-rc9.1-nightly-20220804
  6. 2.0.0-rc9.2

They have this precedence (ascending):

  1. 2.0.0-rc8-nightly-20220718
  2. 2.0.0-rc9
  3. 2.0.0-rc9.1
  4. 2.0.0-rc9.2
  5. 2.0.0-rc9.1-nightly-20220804
  6. 2.0.0-rc9-nightly-20220722

Since the comparison is based on each dot separated field, the solution will be to use a . instead of - to separate the "nightly" and snapshot build identifiers:

  1. 2.0.0-rc9.2
  2. 2.0.0-rc9.2.nightly-20220814
  3. 2.0.0-rc9.3

@per1234 per1234 added topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project and removed type: enhancement Proposed improvement labels Aug 12, 2022
@ubidefeo ubidefeo added the topic: code Related to content of the project itself label Aug 16, 2022
@per1234 per1234 added the conclusion: resolved Issue was resolved label Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants