zumo-32u4-arduino-library icon indicating copy to clipboard operation
zumo-32u4-arduino-library copied to clipboard

More than one package for the Pushbutton requirement

Open BlueAndi opened this issue 5 months ago • 2 comments

The library depends on the Pushbutton libraray, but because there are several around in PlatformIO, the PIO libraray manager complains:

Library Manager: Installing Pushbutton Library Manager: Warning! More than one package has been found by Pushbutton requirements: Library Manager: - pololu/[email protected] Library Manager: - gerdmuller/[email protected] Library Manager: - italo-coelho/[email protected] Library Manager: Please specify detailed REQUIREMENTS using package owner and version (shown above) to avoid name conflicts

BlueAndi avatar Feb 08 '24 19:02 BlueAndi

You might be able to solve that warning by adding a platformio.ini to your project that specifies pololu/PushButton as a requirement. Do you know if there's anything we could add to this library that makes PlatformIO work better?

DavidEGrayson avatar Feb 08 '24 20:02 DavidEGrayson

PlatformIO recommends using a library.json file (details: https://docs.platformio.org/en/stable/manifests/library-json/index.html#library-json ) which can be additional available in the repository. So you can keep the Arduino libaray.properties in parallel.

The PlatformIO team confirmed that in case both files are available, PIO will use the library.json instead (see https://community.platformio.org/t/library-json-or-library-properties-which-one-takes-precedence/9063/4 )

Inside the library.json you can specify exactly the requirements for the dependencies: https://docs.platformio.org/en/stable/manifests/library-json/fields/dependencies.html

BlueAndi avatar Feb 08 '24 20:02 BlueAndi