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

Add language item for product multiplexing

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • None

    Description

      Product multiplexing is currently enabled and configured via module properties in the qbs module. Unfortunately this comes with restrictions:

      • multiplexed properties are static and pollute the qbs module
      • early evaluation of the qbs module complicates the implementation of module loader

      Proposal: Introduce a language item to control multiplexing
      Requirements:

      • allow multiplexing of arbitrary product properties
      • allow multiplexing of arbitrary module properties
      • allow profile multiplexing
      • allow products to be multiplexed by multiple matrices

      How to match multiplexed dependencies is a different topic and should be handled separately, refer to QBS-995 for instance.

      Suggestion, syntax similar to Properties or Profile item

      // Matrix with 2 properties multiplexed on 1 axis
      Multiplex {
          // 2 properties multiplexed on a single axis
          qbs.architecture: ["avr", "msp430", "arm"]
          product.someProp: "someValue" // value is automatically expanded to match
                                        // the length of qbs.architecture
         
          // Matrix inheriting the outer matrix, contributing 
          // 1 additional property on a second axis.
          Multiplex {
              name: "matrix" // allows products to refer to it
              // 1 property multiplexed on a single axis
              product.anotherProp: ["yes", "no", "maybe"]
      
              excludedCells: [
                  { 
                      "qbs.architecture": "msp430", 
                      "product.anotherProp": "no" 
                  }
              ]
          }
      }
      

      The complexity grows from outer to inner. This is debatable, but it makes it very easy and elegant to define multiple matrices with a shared axis.

      Structure: Multiplex wraps products:

      Multiplex {
          Product {
          }
      }
      

      Structure: Multiplex in Product like Properties item:

      Product {
          Multiplex {
          }
      }
      

      Structure: Matrix on the same level as Product items:

      Multiplex {
          name: "matrix"
      }
      Product {
          multiplexedBy: ["matrix", ...]
      }
      // ...
      

      Question: Would it make sense to let this item multiplex any other item?

      
      

      Attachments

        Issue Links

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

          Activity

            People

              rweickelt Richard Weickelt
              rweickelt Richard Weickelt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes