-
Notifications
You must be signed in to change notification settings - Fork 1
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
Correct library names in depends
metadata field
#1
Conversation
The `depends` field of the library.properties metadata field specifies the dependencies that should be installed along with the library by the Arduino Library Manager. While Arduino IDE 1.x is fairly lenient about the quality of the metadata, Arduino CLI (and thus the tools that use it such as Arduino IDE 2.x as well) is more strict. If any of the items in the field are not available from the Arduino Library Manager, installation fails: $ arduino-cli lib install M5Family Error installing M5Family: No valid dependencies solution found: dependency 'M5Unit-UHF-RFID' is not available This also applies to transitive dependencies: $ arduino-cli lib install M5Stack Error installing M5Stack: No valid dependencies solution found
Thanks for the reminder, but I have some questions about M5Unit-UHF-RFID. Is it because this repository is not submitted in the Arduino Library Manager that it can't be downloaded, or is it because the name of this repository does not conform to the relevant specification that causes the problem? |
No. It was submitted: arduino/library-registry#759
No. There is no problem with the name of the repository. It is very simple. There is a unique identifier for every library in the Arduino Library Manager. The The unique identifier is the value the
So the only valid way to refer to this library when using the Library Manager system is "UNIT_UHF_RFID". The name of the repository is completely irrelevant. |
Ok, I understand, I will submit M5Unit-UHF-RFID and modify the relevant fields in Depends to replace UNIT_UHF_RFID |
Hi per1234, we have recently received feedback from users that they are unable to press the download button due to too many dependencies, is there no other way than to use Arduino 2.x or the Arduino CLI? |
Hi @Tinyu-Zhao. I'm sorry for the inconvenience. I am aware of this bug in Arduino IDE 1.x, which is being tracked by the Arduino developers here: Unfortunately I don't know of any workaround for the bug. |
Thank you for your answer, I intend to teach users to use the Arduino CLI to download libraries. |
The
depends
field of thelibrary.properties
metadata file specifies the dependencies that should be installed along with the library by the Arduino Library Manager.While Arduino IDE 1.x is fairly lenient about the quality of the metadata, Arduino CLI (and thus the tools that use it such as Arduino IDE 2.x as well: arduino/arduino-ide#621) is more strict. If any of the items in the field are not available from the Arduino Library Manager, installation fails:
This also applies to transitive dependencies:
The problematic names:
M5Unit-UHF-RFID
You can see the registered name in the last of the pipe-separated fields here:
https://github.com/arduino/library-registry/blob/977b91bd38014ed5c5b978518f6a4ec3694570a4/registry.txt#L4530
M5-FPC1020A
The correct name
M5_FPC1020A
was already present later in thedepends
field, so it was only necessary to remove the invalid name.You might consider setting up an automated check in your library repository for compliance with the Arduino Library specification. This could run on every commit and pull request to ensure such violations are caught immediately.
Arduino provides a GitHub Actions action that makes this very easy to do by adding a simple YAML file to the repository:
https://github.com/arduino/arduino-lint-action#readme
This action uses the same Arduino Lint tool as the Library Manager system.
It is in use in all the official Arduino library repositories (example).