Skip to content

Library Manager version menu selection changes if user closes dependencies installation dialog #1707

Closed
@per1234

Description

@per1234

Describe the problem

An Arduino library can specify dependencies on other libraries via its metadata. When the user installs a library with defined dependencies via Library Manager, Arduino IDE shows a dialog that offers to install these dependencies along with the library.

image

If the user closes that dialog, the selection in the version menu changes:

  • If the latest version is currently selected, the previous version is selected
  • If a previous version is currently selected, the latest version is selected

🐛 The user will likely not notice this unexpected change. If they trigger an install operation on the library once more, they will install a different version than they intended.

If the version the IDE attempts to switch the menu to is currently installed, the current selection is retained, but an install operation will attempt to install the version it attempted to switch the menu to.

🐛 The user will be confused when the installation operation fails due to attempting to install a different version than was already selected.

To reproduce

  1. Find the "ArduinoModbus" library in the Library Manager view.
  2. If the library is already installed, uninstall it.
  3. Take note of the selection in the version menu (e.g., "1.0.7")
  4. Click the INSTALL button.
  5. Click the X icon on the "Install library dependencies" dialog.
    🐛 The selection in the version menu changed.
  6. Select the version of the library before the latest version from the menu (e.g., if the latest version is 1.0.7, select "1.0.6" from the menu).
  7. Click the INSTALL button and install the library.
    🙂 The version menu selection changes to the latest version of the library.
  8. Click the INSTALL button.
  9. Click the X icon on the "Install library dependencies" dialog.
    🙂 The latest version of the library is still selected in the version menu.
  10. Click the INSTALL button and install the library.
    🐛 The version of the library selected from the version menu is not installed. The Output view shows that the install operation attempted to install the previous version:

    Already installed ArduinoModbus@1.0.6

Expected behavior

Version menu selection only changes after a successful installation.

Arduino IDE version

2.0.2

Operating system

Windows

Operating system version

10

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

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions