Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-61

support multiple instances of the same logical module

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Open
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 0.1
    • Fix Version/s: some future version
    • Component/s: General
    • Labels:
      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:

      1. 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
      2. 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

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              buddenha Oswald Buddenhagen
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes