Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
0.1
-
None
Description
it is desirable to support the case of several instances of the same logical module (i.e., modules with the same name) competing with each other within a Product's context.
fundamentally, there are two axes along which these instances can be distinguished:
- content (QBS-995): the modules have the same name, but differ by other properties which limit their suitability for a particular build. some such properties are:
- everything that affects ABI (target OS and architecture, toolchain vendor and version, exception model, etc.)
- build options that enforce dependencies, e.g. debug vs. release runtime on Windows
- build options that disable optional features
- source (
QBS-1604, QBS-1658): the modules differ only by where they come from:- a project may want to use a library which is already installed on the system, but still have an own copy of the library to have a fallback - think libpng in qt
- the system's library may be provided by several modules, like a pkg-config based probe, and a "hand-crafted" one ("inline" in the new qt configure's terms).
- external libraries will ideally come with own qbs files, one for each build.
approximate mechanism proposal
- qbs iterates over products, collecting dependencies
- each dependency must be satisfied by a module or product
- which of these it should be (preferentially) is decided by examining qbsModuleSources (QBS-1658)
- if a product is chosen, that may cause it to be built in the first place (QBS-581) and decide about how it is built (QBS-1197)
- if a native module is chosen, qbsSearchPaths is scanned for it
- if a generated module is chosen, a provider needs to generate it (
QBS-1107)- which provider(s) are used is decided by examining qbsModuleProviders (
QBS-1604), and conversely, providers may be told which modules to actually generate (QBS-1662) - providers may be configured by packages (QBS-1452)
- logically, all providers are executed, and the first module in the list (ordered by qbsModuleProviders) that matches the requirements (QBS-995) is used, though for efficiency the providers may be fed the desired module properties as well, so unsuitable modules can be omitted from generation a priori, and the search can be cut short after the first match
- which provider(s) are used is decided by examining qbsModuleProviders (
Attachments
Issue Links
- is duplicated by
-
QBS-1664 External Dependency management
- Closed
- is required for
-
QBS-62 support for automatically fetching missing external dependencies
- Open
-
QBS-68 need to bootstrap somehow
- Closed
- relates to
-
QBS-1625 establish syntax & semantics for constraining dependencies
- Reported
-
QBS-995 add a generic way to constrain dependencies
- Reported
-
QBS-1658 support multiple sources for one module
- Reported
-
QBS-1604 support multiple module providers for one module
- Closed
-
QBS-1662 Feed module providers with the list of modules to generate
- Closed
-
QBS-1302 Qbs can't choose module candidate with different versions
- Closed
-
QBS-1214 support of Modules dependencies on Products
- Closed
-
QBS-1452 parameterization of locating external dependencies
- Reported
-
QBS-576 it must be possible to explicitly declare alternative dependencies
- Open
-
QBS-1107 add module provider factories
- Closed
Gerrit Reviews
For Gerrit Dashboard: QBS-61 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
205376,6 | Yield error on conflicting module instances | master | qbs/qbs | Status: MERGED | +2 | 0 |
205377,10 | Introduce Module.priority | master | qbs/qbs | Status: MERGED | +2 | 0 |