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

Look-up of scalar properties is strange/wrong for nested modules

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 1.3.4
    • 1.3.3, 1.4.0
    • General
    • None
    • db0dc474c2bea9a108f0ae4b7575cfab395556e2

    Description

      For instance, consider this simple case with two modules:

      Module "lowerlevel":

      Module {
          property string prop: "value in lowerlevel module"
      }
      

      Module "higherlevel":

      Module {
          Depends { name: "lowerlevel" }
          lowerlevel.prop: "value in higherlevel"
      }
      

      Product using these modules:

      Product {
          type: "mytype"
          Depends { name: "higherlevel" }
          Group {
              files: ["dummy.txt"]
              fileTags: ["dummy-input"]
          }
          Rule {
              inputs: ["dummy-input"]
              Artifact {
                  filePath: "dummy.out"
                  fileTags: product.type
              }
              prepare: {
                  var cmd = new JavaScriptCommand();
                  cmd.sourceCode = function() { };
                  var prop = product.moduleProperty("lowerlevel", "prop");
                  cmd.description = "lowerlevel.prop is '" + prop + "'.";
                  return [cmd];
              }
          }
      }
      

      The value printed is the one from the lower-level module, when one would except it to get overridden by the higher-level module. Note that it does not make any difference where the rule is located; it could also be in either of the modules, with the same result.

      Attachments

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

        Activity

          People

            jbornema Joerg Bornemann
            kandeler Christian Kandeler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes