Using libs that depend on different versions of the a third library

We have a large number of repositories that have implementations of our framework functionality for different hardware components. Those repositories are of course dependent on the framework repository, which is declared in the library.json file with a version of the framework.

When we create a product then we add dependencies of the hardware repositories to our project platformio.ini file. If the repositories are dependent on different versions of the framework then the framework get downloaded multiple times in the libdeps folder.

So I have the i.e. following dependency structure:

  • project
    • hardwareLib X 1.0.0
      • framework 1.0.0
    • hardwareLib Y 1.0.0
      • framework 1.1.0

What I’m wondering is, when compiling/linking the project, esp when compiling the source files from the hardware repositories does it know which version of the framework to use for each of the files of the hardware repositories…?