This behavior can be also restricted defining the CONAN_ERROR_ON_OVERRIDE environment variable to raise an error when these overrides happen, and then the user can go and explicitly modify the upstream pkgb/1.0 recipe to match the version of PkgA and avoid the override. Note that this is not a diamond structure in the graph, so it is not a conflict by default. Even when a package recipe upstream defines an older version, the downstream consumers can force to use an updated version. This is what enables the users to have control. But if a downstream consumer defines a requirement to pkga/2.0, then that version will be used in the upstream graph: For example, pkgb/1.0 could define in its recipe a dependency to pkga/1.0. The downstream consumer packages always have higher priority, so the versions they request, will be overridden upstream as the dependency graph is built, re-defining the possible requires that the packages could have. The dependency resolution algorithm will also raise an error. In the example above, both PkgB and PkgC can be requiring the same version pkga/1.0, but one of them will try to use it as a static library and the other one will try to use it as shared library. The same situation happens if the different packages require different configurations of the same upstream package, even if the same version is used. The executable in pkgd/1.0, cannot link with 2 different versions of the same static library in pkgc, and the dependency resolution algorithm raises an error to let the Pkga/2.0, which is also another static library. In turn, pkgb/1.0 depends on pkga/1.0 and finally pkgc/1.0 depends on Lets say that we are building an executable in pkgd/1.0, that depends on pkgb/1.0 and pkgc/1.0, The same package but different versions, this is known as a conflict (a version conflict). This is known as “diamonds” in the graph. When two different branches of the same dependency graph require the same package,
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |