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

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 1.13.0
    • Fix Version/s: None
    • Labels:
      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

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

          Activity

            People

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes