Version management features missing for installed libraries with non-semver versioning #2385
Open
3 tasks done
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Describe the problem
Although compliance with the SemVer specification when versioning library releases is recommended to library maintainers, it is not mandatory. Arduino allows an version number that is compliant with what is referred to as "relaxed SemVer". This means that a library might have a version number with a form like
1.2
or even1
.🐛 If a library is installed that has a non-SemVer version number, some of Library Manager's version management features are not available for that library:
To reproduce
ⓘ Note that after installing, the library entry shows the installed version number is "1.61".
🐛 The version selector menu disappears from the "AccelStepper" library entry.
🐛 There is no "UPDATE" button on the the "AccelStepper" library entry, even though a newer version of the library is available.
🐛 There is no "Remove" item in the menu, even though the library is installed.
A sub-menu will open.
🐛 Version 1.59.0 of the library is not installed.
Expected behavior
Version management features are always available.
Arduino IDE version
aa9b10d
Operating system
Windows
Operating system version
11
Additional context
When a library release is added to the (Library Manager index](http://downloads.arduino.cc/libraries/library_index.json), the version number is converted to the SemVer equivalent (e.g.,
1.2
->1.2.0
). This means that the version numbers in thecc.arduino.cli.commands.v1.LibrarySearch
response (which is based on the data from the index) are in SemVer format even when the library's actual version number is not.Conversely, the version numbers in the
cc.arduino.cli.commands.v1.LibraryList
response (which is based on the installed library metadata) are in whatever format used by the library maintainer (arduino/arduino-cli#1727).This means that there is a mismatch between the version numbers from the two responses (both of which are used by the Arduino IDE Library Manager) under these conditions. I suspect the bug is related to this mismatch.
Workaround
Install different version of library
The label will change to "REMOVE".
The "Uninstall" dialog will open.
A version selector menu will now appear on the library's Library Manager entry.
Update library
Use the "Installing different version" procedure described above to install the latest version of the library.
Uninstall library
The label will change to "REMOVE".
The "Uninstall" dialog will open.
Issue checklist
The text was updated successfully, but these errors were encountered: