Skip to content

lib upgrade does not install dependencies #1856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
per1234 opened this issue Aug 30, 2022 · 2 comments · Fixed by #1934 or #1935
Closed
3 tasks done

lib upgrade does not install dependencies #1856

per1234 opened this issue Aug 30, 2022 · 2 comments · Fixed by #1934 or #1935
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Aug 30, 2022

Describe the problem

Arduino libraries may have dependencies on other libraries. These can be specified in the library's metadata, which will cause Arduino CLI to install them along with the library.

🐛 The dependencies of a library are not installed when a new version of the dependent library is installed by arduino-cli lib upgrade

To reproduce

$ arduino-cli version
arduino-cli.exe  Version: git-snapshot Commit: 05d14464 Date: 2022-08-30T19:43:20Z

$ arduino-cli lib uninstall MKRWAN
Uninstalling [email protected]...

$ arduino-cli lib install [email protected]
Already installed [email protected]
Already installed [email protected]
Already installed [email protected]
Already installed [email protected]
Already installed [email protected]
Downloading [email protected]...
[email protected] already downloaded
Installing [email protected]...
Installed [email protected]

$ arduino-cli lib deps [email protected]
✓ MKRNB 1.5.1 is already installed.
✓ Arduino_ConnectionHandler 0.3.3 is already installed.
✓ Arduino_DebugUtils 1.3.0 is already installed.
✓ WiFi101 0.16.1 is already installed.
✓ WiFiNINA 1.8.13 is already installed.
✓ MKRGSM 1.5.0 is already installed.

$ arduino-cli lib upgrade
Downloading [email protected]...
[email protected] already downloaded
Installing [email protected]...
Replacing [email protected] with [email protected]...
Installed [email protected]

$ arduino-cli lib deps [email protected]
✓ WiFiNINA 1.8.13 is already installed.
✓ MKRGSM 1.5.0 is already installed.
✓ MKRNB 1.5.1 is already installed.
✕ MKRWAN 1.1.0 must be installed.
✓ Arduino_ConnectionHandler 0.6.6 is already installed.
✓ Arduino_DebugUtils 1.3.0 is already installed.
✓ WiFi101 0.16.1 is already installed.

🐛 The new dependency MKRWAN (added after the time of the [email protected] release) was not installed.

Expected behavior

Install dependencies of libraries upgraded by arduino-cli lib upgrade, just as already happens when upgrading individual libraries (e.g., arduino-cli lib install Arduino_ConnectionHandler).

Arduino CLI version

05d1446

Operating system

Windows

Operating system version

Windows 10

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Aug 30, 2022
@KurtE
Copy link

KurtE commented Oct 6, 2022

Not sure if this is the same issue or not?

Selecting to option to update a library and all of its dependencies, did not appear to do anything.

Yesterday I opened up the daily IDE build I had installed on my Windows machine. Maybe 1005 or 1004 I think.

It came up with the list of libraries. There were several of the Adafruit libraries that showed that needed to be updated.
I selected one of them and it said it depended on some other libraries. With the three options: Install all, install only this one, ...

I selected install all of them and it appeared like nothing happened. There was zero output in the output window. I then clicked on the install only this one and it did install that specific one. I repeated the same thing with a couple of others, and same thing.

I am now running todays build, but I don't have any more of these dependencies to try it with.

@per1234
Copy link
Contributor Author

per1234 commented Oct 7, 2022

Hi @KurtE. There was a bug in the IDE that caused the "INSTALL ALL" and "CANCEL" buttons to be swapped on that dialog. It was fixed a few days ago so it should no longer occur when using the latest nightly build. Please let us know if you still experience the problem with the updated version.

More information here: arduino/arduino-ide#1512

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
4 participants