Dependencies when installing from library zip

Hello,

I am running a bit crazy here.
It seems that arduino-cli does not install dependencies when installing a .zip library.
Am I correct ? Or did someone manage to have that working ?

Sorry if it is a known limitation, but I found the information nowhere.

Cheers
Q

Hi @quentin_sensirion.

You are correct. Dependency installation is only available when you are installing a library from Library Manager. When installing a library from a ZIP file you should make sure to also run a command to install each of the dependencies. You can check to see if they are available for convenient installation via Library Manager.

1 Like

Hej @ptillisch ,

Thanks a lot for your quick answer.
I assume there are good reasons behind this limitation, so I will not argue the decision.
Is it mentioned somewhere in the documentation ? (maybe I missed it...)
If not that would be a great addition in my opinion, as the behavior is a bit confusing.

Thanks
Q

Would an IDE reboot identify missing dependencies?

I think the reason is simply that the development resources available for implementing and maintaining features are limited and installation of libraries from ZIP files is something done relatively rarely by users so such a feature is not a priority. The Library Manager system gets the information about the dependencies from the Library Manager index so a completely different system for getting dependencies information (extract library and then read the data from the metadata file) would need to be implemented for the ZIP libraries.

This feature was already requested and declined by the Arduino CLI developers:

Unfortunately it was a low quality feature request which unnecessarily mashed together two distinct feature requests into a single issue. The developer got confused by this and actually rejected the entire request based on the other feature (the ability to put Git clone URLs in the depends metadata field). The users don't realize how much they harm their own interests by being lazy/disorganized when submitting feature requests and bug reports.

No. The presence of dependencies are only checked for at the time of the library installation.

To be clear, we are talking about the system where a library author can define a list of other libraries their library depends on in the depends field of the library.properties metadata file:

https://arduino.github.io/arduino-cli/dev/library-specification/#libraryproperties-file-format:~:text=on%20the%20list.-,depends,--%20(available%20from

For example:

For general information, I opened an issue on github about that. I hope it will achieve one of two things:

  • Change the behavior to allow dependencies when installing a .zip lib
  • Improve documentation to specify that it is not supported (if rejected)

Thank you @ptillisch for the clarification
Q

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.