-
-
Notifications
You must be signed in to change notification settings - Fork 792
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
Handle libraries which are compatible with build environment using "library.json" data #148
Comments
Thank you for opening this issue. Having had time to consider the matter some more, I think the build environment should only be considered to resolve ambiguities (two libraries with the same name targeting different platforms), unless the user chooses 'strict' library handling. Otherwise we would introduce too many potential problems for the existing platforms. With much more libraries introduced for the mbed platform however, library names may become more difficult to be kept unique. |
I don't see problems here. PlatformIO Library Manager is based on SolutionHow about ignore_libs? It allows to keep many libs with the same names, but have ability to skip some libs for the specific build environment. ExampleLet's see into these libs: They have the same name, but is compatible with the different platforms/frameworks. Question: How to build different envs using these libs without conflicts? [env:arduino_board]
platform = atmelavr
framework = arduino
# skip "energia" lib from Library Dependency Finder
ignore_libs = DHT22_58
[env:energia_board]
platform = timsp430
framework = energia
# skip "arduino" lib from Library Dependency Finder
ignore_libs = DHT22_115 As we can see, we can have multiple libs, but using Should I close this issue with |
I'm not sure about the 'wontfix' label, is there a 'fixlater'? The problem I see with the ignore_libs solution is, that the platform.ini might require changes at the time another platform gets a library that happens to have the same name as one of the libraries required by the specific build environment. So I propose a solution where the library manager uses the platform information in the library manifest if -and only if- the library name alone is ambiguous. |
I want to emphasise, that Could I ask you to describe me an example, where |
The problem I see with
IMHO this also might be an issue for library dependencies, even more so when adding more and more libraries from different sources What do you think? |
Andy, thanks! I got you now. I will implement |
Resolved in f001c08 |
Currently, PlatformIO Library Dependency Finder analyse only
#include
and decides which library should be used in appropriate order. However, we have situation where a few libs have the same names (or even#include
), but are compatible with different platforms/frameworks.Need to analyse library.json and use libs which correspond to "build environment" framework/platform.
The text was updated successfully, but these errors were encountered: