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

Property "present" of non existing optional module dependency is true in other Depends statements

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 1.13.0
    • None

    Description

      The following minimal example demonstrates the issue:

      import qbs 
      Product {
          name: "issue"
          Depends { name: "m1"; required: false }
          Depends { name: "m2"; required: m1.present }  
          condition: { console.info("m1.present=" + m1.present); return true }
      }
      

      qbs prints a warning that m2 is not found which is not ok. The console output prints "false" which is ok.

      Workaround: Set enableFallback to false for module m1 and delete the qbs .bg file before the next qbs run (I am not sure if this false caching might be another issue).

      Looks like the generated code for the fallback handling is the reason for this regression and may also be the reason why .bg file has to be deleted for the work-around.

      Attachments

        Activity

          People

            kandeler Christian Kandeler
            jochenbecher Jochen Becher
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: