-
-
Notifications
You must be signed in to change notification settings - Fork 227
This is a page meant to collect frequent questions and answers about DUB
The dependency resolution process is independent of the configuration resolution process. The upgrade process that is responsible for resolving and downloading dependencies does not know which configuration will be built later on. For an explanation why the system works this way, see the next question about dependencies and platform specifiers.
There are two independent resolution processes when building a DUB project:
-
A valid dependency graph is computed. This makes sure that all direct and indirect dependencies are use with versions that adhere to the version specifications by which they are referenced.
-
The second step is to compute a valid set of configurations for the current platform and build configuration. Depending on this set of configurations, the set of dependencies that actually need to be built is then determined.
This dependency resolution process is designed to be independent of any platform specifics not only because it greatly simplifies the logic to reason about conflicts, as well as the implementation, but most importantly it means that the result can be used independently of the chosen platform or build configuration.
Especially the dependency version selection feature (dub.selections.json) that is used to guarantee repeatable builds, would not work in a meaningful way if dependencies, platforms and configurations would be intertwined. Possibly every possible combination would result in a different set of selected dependency versions and the contents would be meaningless when building on a different platform.