Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Handle libraries which are compatible with build environment using "library.json" data #148
Currently, PlatformIO Library Dependency Finder analyse only
Need to analyse library.json and use libs which correspond to "build environment" framework/platform.
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
How 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.
Let'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?