Skip to content
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

More than one package for the Pushbutton requirement #7

Open
BlueAndi opened this issue Feb 8, 2024 · 2 comments
Open

More than one package for the Pushbutton requirement #7

BlueAndi opened this issue Feb 8, 2024 · 2 comments

Comments

@BlueAndi
Copy link

BlueAndi commented Feb 8, 2024

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

@DavidEGrayson
Copy link
Member

DavidEGrayson commented Feb 8, 2024

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
Copy link
Author

BlueAndi commented Feb 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants