pololu / zumo-32u4-arduino-library

Library to help interface with the on-board hardware of the Pololu Zumo 32U4 robot.
https://www.pololu.com/category/170/zumo-32u4-robot
MIT License
67 stars 61 forks source link

More than one package for the Pushbutton requirement #7

Open BlueAndi opened 9 months ago

BlueAndi commented 9 months ago

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/Pushbutton@2.0.0 Library Manager: - gerdmuller/PushButton@0.1.2 Library Manager: - italo-coelho/pushButton@1.0.2 Library Manager: Please specify detailed REQUIREMENTS using package owner and version (shown above) to avoid name conflicts

DavidEGrayson commented 9 months ago

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?

BlueAndi commented 9 months ago

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