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

Offer suggestions on error

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P3: Somewhat important
    • 1.9.0
    • 1.8.0
    • Command Line Frontend
    • None
    • 7e04367d71f2b7df5326c6da6d3c1d6e5d28e407

    Description

      Currently Qbs throws unclear error messages when trying to build for the first time.

      I've just manually set the toolchain and Qt profiles.

      I ran qbs create-project on a test qmake project.

      Trying to build is very unclear what the build system expects from the user:

      $ qbs                                                                        
      No build graph exists yet for this configuration.
      Resolving project for configuration default
      ERROR: /home/lilian/QtProjects/test/test.qbs:5:5 Dependency 'Qt.core' not found for product 'test'.

      As a "new user"(I've used Qbs before but back then I also struggled with the profiles and the actual build):

      • "build graph" does not explain what I did wrong(also, seems to throw the implementation detail as an error to the user).
      • I didn't know that "default" has special meaning in that text(I realized that later when I tried the next command).
      • The "ERROR" message is not helpful in explaining the actual cause of the issue.

      Would be nice if in this case it would of suggested the command I could use to fix this issue. For example, how to set a default configuration.

      This is mostly inspired by Rust error messages like this:

      error[E0002]: non-exhaustive patterns: type std::option::Option<i32> is non-empty
        --> src/test/compile-fail/E0002.rs:14:5
         |
      14 |     match x { } //~ ERROR E0002
         |     ^^^^^^^^^^^ not all cases are handled
         |
         = note: this may be fixed by possibly adding wildcards or more match arms.

       

      Then I tried this:

      $ qbs debug                                                                
      No build graph exists yet for this configuration.
      Resolving project for configuration debug
      ERROR: /home/lilian/QtProjects/test/test.qbs:5:5 Dependency 'Qt.core' not found for product 'test'.

      It should probably say that there is no "debug" configuration and list the available configurations, and maybe suggest how I could add one(doesn't need the full command, just a starting point).

      I ran qbs config after that, hoping that I could find something in the help message that would indicate how I could set a configuration. Currently still lost(will sift again through the documentation of course).

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            lilian.moraru Lilian A. Moraru
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes