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

The product.profiles property interacts with product-level qbs properties in unexpected ways

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P0: Blocker
    • 1.3.4
    • 1.3.3, 1.4.0
    • General
    • None
    • 6fdf405ad7105e93f5de38a396c4b3f206a2a0ca

    Description

      Consider this simple product:

      import qbs
      
      Product {
          property bool isBlubbOS: qbs.targetOS.contains("blubb-OS")
          profiles: isBlubbOS ? ["blubb-profile"] : [project.profile]
          qbs.architecture: "blubb-arch"
      }
      

      Now try to build it and stare in disbelief at the qbs output:

      test-product.qbs:4 TypeError: Result of expression 'qbs.targetOS' [undefined] is not an object.
      

      Note 1: Instead of qbs.architecture, you can use any other qbs property.
      Note 2: You cannot use properties of other modules. If you e.g. add a cpp dependency and set cpp.toolchain instead of qbs.architecture, the error will not occur.
      Note 3: If you use the qbs property in a group instead of the product level, the error will also not appear.

      Preliminary conclusion: Something is wrong with attaching the base module in the case of profile multiplexing (even if we "multiplex" to a single profile).

      Attachments

        For Gerrit Dashboard: QBS-728
        # Subject Branch Project Status CR V

        Activity

          People

            kandeler Christian Kandeler
            kandeler Christian Kandeler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes