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

support multiple instances of the same logical module

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • some future version
    • 0.1
    • General
    • 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

              Unassigned Unassigned
              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