No upgrade button on libraries?

I have people telling me that there is no way to click upgrade on a couple of my libraries.

I have no idea how this could happen. There are newer versions available..
Slow servo --- v1.2 github
Base tools ---- v1.12.0 github

Any ideas? Anyone?

Should probably include links..

Thanks!

-jim lee

Well, since writing this they uninstalled the libraries then let the IDE re-install them. So he’s got the latest ones now. So I have no more data to show.

But this is still kinda’ a bit distressing.

-jim lee

I did install both libraries in IDE 2.3.8; they were the latest versions 1.12.0 and 1.2.

LC_slowServo shows as you described, LC_baseTools is OK.

Next I downgraded LC_baseTools to version 1.9 and after that there was indeed no option anymore (as per your screenshot in the in the opening post).

Comparing the versions in library.properties shows that the latest LC_baseTools is 1.12.0 while LC_slowServo is missing the last part.

After editing the library.properties files for both libraries to correct the versions (1.9.0 and 1.2.0 respectively) and restarting the IDE it shows as expected.

PS

  1. I did not look at the spec
  2. Your older versioning works as expected in IDE 1.8.19.

So.. Older versions where it was just x.y as opposed to x.y.z Don’t work.

That means everyone with the old versions are kind’a locked there? Is there a way to change an old version on Github?

BTW thanks for doing that and checking that out. I really appreciate it!

-jim lee

I think so.

The advise from my site would be to create a new release of LC_slowServo with correct version number; the current LC_baseTools is fine.

I have no idea. It will however not help for those that already have the "faulty" version.
I would put a note in the readme.md how to upgrade from an older version to the latest; I understand that not everybody reads the readme.md but at least it's something that you can point the users to.

Pleasure.

I did look at it now :wink: You might have found a bug in IDE 2.x / Arduino-CLI.
See Library specification - Arduino CLI

So it states that "1.2" is accepted. Now it depends on ones interpretation of "accepted"; my interpretation is that it should not break the upgrade/downgrade capabilities.

And a little more digging (https://semver.org/; emphasis added)

So it looks to me that the earlier statement in the library specification that "1.2" is accepted is incorrect.

I’ll do the note on the readme(s). Some may find it.

I do worry though. I have a LOT of libraies to check over there.

Thanks again for looking into this.

-jim lee

Often there's not much to say in the title. arduino-ide is pretty boring: just the version number. But arduino-esp32: "Arduino Release v3.3.7 based on ESP-IDF v5.5.2". So that's two version numbers.

Looks like the not-fully-semvar-compliant version number breaks the UI, causing that row with the version picker and the Update/Remove/Install button to be missing. This might have resulted from fixing/improving something elsewhere (but related).

Going forward, does the mere presence of the "bad tag" break it? If so -- and maybe just to avoid confusion -- you may need to delete those releases on GitHub. So you'd add a new release, "1.2.0, formerly 1.2 and whatever you want to say here"; then delete 1.2. Do you have to do anything to get updates listed? Or does something automatically scan daily or whenever to pick those up?

If someone has "1.2 installed" and then the now-correct version list contains "1.2.0" -- that to a computer is "later", and maybe the UI will offer to upgrade to that? Or for 1.2.1 or 1.3

First, try adding 1.2.0. Or call it 1.2.1. See what happens.

Hi @jimLee. The formal report for the bug is here:

Workarounds for the bug are described here:

https://github.com/arduino/arduino-ide/issues/2385#user-content-workaround

I don't think it is worth the effort. As @sterretje said, recreating old releases with SemVer compliant version numbers won't help the people who already have an old release installed, because they already have the problematic library on their computer. The only solution for them is to uninstall the current installation of the library and then install the new version. You changing the existing old versions on GitHub doesn't help them in any way in that procedure.

The important thing is for there to be a new release of each of your libraries with a SemVer compliant version number. Users almost always install the latest version of the library, so as long as that latest version has a SemVer version number, they won't encounter the bug after installing your library.

The statement is correct. Note the wording of the specification:

Version should be semver compliant

"Should" means that following the SemVer specification is encouraged, but not mandatory.

The Arduino Library Specification supports a versioning scheme called "relaxed SemVer":

https://github.com/bugst/relaxed-semver#semantic-versioning-specification-followed-in-this-library

No. The conditions under which the fault occurs is that the user has a library installed with a version number that is not SemVer compliant. As long as the installed version has a SemVer compliant version number, the user will not be affected by the bug.

Doing this alone wouldn't have any effect because this is happening in Arduino Library Manager. Library Manager is populated by an index. The releases are already in the index, and removing the tag from the repository doesn't change that. A release can only be removed by formal request:

https://github.com/arduino/library-registry/blob/main/maintenance-requests.md#remove-a-library-release

It really isn't worth the effort to do all that.

It won't work.