Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Version management features missing for installed libraries with non-semver versioning #2385

Open
Labels
topic: codeRelated to content of the project itself type: imperfectionPerceived defect in any part of project
@per1234

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

  1. 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
  2. Hover the mouse pointer over the "AccelStepper" entry.
  3. 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
  4. Select "Other Versions" from the menu.
    A sub-menu will open.
  5. 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

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 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
  1. Hover the mouse pointer over the "<version number> installed" label on the library's Library Manager entry.
    The label will change to "REMOVE".
  2. Click on "REMOVE".
    The "Uninstall" dialog will open.
  3. Click the "YES" button in the dialog.
  4. Wait for the uninstall process to finish.
    A version selector menu will now appear on the library's Library Manager entry.
  5. Select the version you want to install from the version selector menu.
  6. Click the "INSTALL" button.
Update library

Use the "Installing different version" procedure described above to install the latest version of the library.

Uninstall library
  1. Hover the mouse pointer over the "<version number> installed" label on the library's Library Manager entry.
    The label will change to "REMOVE".
  2. Click on "REMOVE".
    The "Uninstall" dialog will open.
  3. Click the "YES" button in the dialog.
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itself type: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /