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

Better error reporting when outer.concat fail

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 1.10.0
    • 1.9.1
    • General
    • None
    • macOS 10.9, 10.10

    • 2e4d332924e17225d08ac11891828e6fefc3529b

      I encountered a strange behavior with inheritance and Properties items with outer.concat. Here is a minimal test code:

      - TestA.qbs -
      CppApplication {
          Depends { name: "cpp" }
          property bool testA: true
          Properties {
              condition: testA
              cpp.defines: ["TESTA"]
          }
      }
      
      - Project.qbs -
      TestA {
          files: "main.cpp"
          Depends { name: "cpp" }
          Properties {
              condition: true
              cpp.defines: outer.concat(["TESTB"])
          }
      }
      

      With this code, qbs fail with the error : "Project.qbs ReferenceError: Can't find variable: testA"
      Which is REALLY not helping...
      If we change "outer" for "base" as it should be, no errors.

      Would be nice to make the error message more helpful, but maybe there is a bug somewhere?

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

            jbornema Joerg Bornemann
            bbenj Balga Benjamin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes