Hi PlatformIO community!
I’m aiming to provide a library to the PIO ecosystem that’s simple to work with. One thing that still puzzles me is how to handle different dependency versions if the project lives in the PIO registry. That’s how the dependency graph of the client project using my library looks like:
Dependency Graph
|-- <ArduinoJson> 6.15.1
|-- <MyLibrary> 0.1
| |-- <ArduinoJson> 6.19.1
Although it downloads both versions of ArduinoJson, the compiler will compile all source files against only one version. However, both code bases rely on their specific version of ArduinoJson.
In this case, it is possible to just copy ArduinoJson into my repo and ship both together as it’s MIT-based. However, I’m curious about the most PIO-like way of compiling with multiple library versions in the libdeps folder. Is it good practice after all or should I rather force the user to just upgrade the common dependency in the client project before using my library?
Thank you!