-
-
Notifications
You must be signed in to change notification settings - Fork 491
Description
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 even 1
.
🐛 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:
- Missing version selector menu
- Missing "UPDATE" button
- Missing "Remove" context menu item
- Non-functional "Other Versions" context menu item
To reproduce
- Use Library Manager to install version 1.61.0 of the "AccelStepper" library.
i 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.
image - Hover the mouse pointer over the "AccelStepper" entry.
- You will see a ●くろまる●くろまる●くろまる icon appear near the top right corner of the library entry. Click on that icon.
🐛 There is no "Remove" item in the menu, even though the library is installed.
image - Select "Other Versions" from the menu.
A sub-menu will open. - Select "1.59.0" from the menu.
🐛 Version 1.59.0 of the library is not installed.
Expected behavior
Version management features are always available.
Arduino IDE version
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 the cc.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
- Hover the mouse pointer over the "<version number> installed" label on the library's Library Manager entry.
The label will change to "REMOVE". - Click on "REMOVE".
The "Uninstall" dialog will open. - Click the "YES" button in the dialog.
- Wait for the uninstall process to finish.
A version selector menu will now appear on the library's Library Manager entry. - Select the version you want to install from the version selector menu.
- Click the "INSTALL" button.
Update library
Use the "Installing different version" procedure described above to install the latest version of the library.
Uninstall library
- Hover the mouse pointer over the "<version number> installed" label on the library's Library Manager entry.
The label will change to "REMOVE". - Click on "REMOVE".
The "Uninstall" dialog will open. - Click the "YES" button in the dialog.
- Wait for the uninstall process to finish.
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details