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

Add --resolve option to qbs build?

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • None
    • Command Line Frontend
    • None

    Description

      It is very annoying when it comes to changing parameters passes to qbs on the command line.
      Let's suppose I build a project with some properties

      qbs config:release modules.cpp.defines:FOO=1

      Now I want to change the define:

      qbs config:release modules.cpp.defines:FOO=2

      I get an error that I need to call resolve first:

      qbs resolve config:release modules.cpp.defines:FOO=2

      Now I can finally build the project:

      qbs build config:release

      It is not clear how this API can be convenient for anyone. There's an argument that this is done for "safety" but my experience shows that this is exactly what use wants - to resolve project when properties are changed.
      This also leads to unnesesary complicated code in scripts, e.g. I have to repeat myself when passing common parameters to resolve and build: https://codereview.qt-project.org/c/qbs/qbs/+/324093/8/doc/CMakeLists.txt
      Possible solutions:
      0. Always resolve when building. "Safety" feature is lost.
      1. Add --resolve option:

      qbs build --resolve config:release modules.cpp.defines:FOO=2

      which does resolve automatically if properties are changed.
      2. Ask user interactively and add --yes option that behaves similar to --resolve option from 1.

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              arch Ivan Komissarov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes