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

Profile items should be evaluated after Project properties are resolved

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 1.15.0
    • 1.15.0
    • General
    • None
    • All
    • e86375117120f8c7b06afa573d9772d3c783f737 (qbs/qbs/master)

    Description

      Works:

      Project {
          property string prop: "bla"
      
          Profile {
              someModule.property: project.prop
          }
      }

      Does not work:

      Project {
          property string prop: probe.prop
      
          Probe {
              id: probe
              property string prop
              configure: {
                  prop = "bla";
                  found = true;
              }
          }
      
          Profile {
              someModule.property: project.prop
          }
      }
      

      In the second example, the value of prop is undefined. The documentation doesn't explicitly specify when and how Profile items are evaluated, But I would assume that Profile items get evaluated after the project is flattened, at least, after all properties of the surrounding Project item are resolved. That includes probe execution.

      Evaluating Profile items before Project items makes less sense to me, because it is not possible to access module properties from within Project items.

      I would furthermore expect that accessing probe from anywhere in the current file would work as well.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes