arduino / arduino-ide

Arduino IDE 2.x
https://www.arduino.cc/en/software
GNU Affero General Public License v3.0
2.23k stars 381 forks source link

Incorrect dialog when library dependency already installed #721

Open per1234 opened 2 years ago

per1234 commented 2 years ago

Describe the problem

Arduino library authors may specify library dependencies in the depends field of the library.properties metadata file. When using Library Manager to install a library that specifies dependencies which are not already installed, the user is offered the installation of the dependencies.

:bug: This dialog is currently presented even when the dependencies are already installed.

To reproduce

  1. Use Library Manager to install the "ArduinoRS485" library.
  2. Use Library Manager to install the "ArduinoModbus" library. (this library specifies a dependency on the "ArduinoRS485" library) :bug: A dialog appears which erroneously claims:

    The library ArduinoModbus:1.0.6 needs another dependency currently not installed:

        - ArduinoRS485

    Would you like to install the missing dependency?

image

Expected behavior

Dependencies installation dialog only appears when dependencies are not already installed.

Arduino IDE version

Original report

2.0.0-rc3

Last verified with

9a6a457bc44fb16f646b9e61a9e8b336b3666412

Operating system

Windows

Operating system version

11

Additional context

The issue occurs even after a restart, so it is not specific to the dependency being installed in the same session as the dependent library, as was done in the demo for the sake of simplicity.

Additional reports

ubidefeo commented 2 years ago

@per1234 does IDE 1.8.x ignore the ones already installed?

per1234 commented 2 years ago

does IDE 1.8.x ignore the ones already installed?

Correct. Arduino IDE 1.x only offers to install the dependencies that are not already installed.

That includes the situation where a library has multiple dependencies, some of which are installed, and others not installed. In this case, it will show the dialog, but only list the ones that are not already installed.