Description
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.
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
- Find the "ArduinoModbus" library in the Library Manager view.
- If the library is already installed, uninstall it.
- Take note of the selection in the version menu (e.g., "1.0.7")
- Click the INSTALL button.
- Click the X icon on the "Install library dependencies" dialog.
🐛 The selection in the version menu changed. - 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).
- Click the INSTALL button and install the library.
🙂 The version menu selection changes to the latest version of the library. - Click the INSTALL button.
- Click the X icon on the "Install library dependencies" dialog.
🙂 The latest version of the library is still selected in the version menu. - 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