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

Add ability to get `input` inside Artifact::fileTags

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • 2.0.1
    • General
    • None
    • All

    Description

      Hi!

      Sometimes, I need to specify Module properties inside Groups. And sometimes, file tags of Artifacts inside Module may depend on this properties.

      Example:

      Product {
              Group {
                      files: ["some_file1"]

                      fileTags: ["module.input"]           

                      someModule.outputTag: "some_tag1"

      }

              Group {

                      files: ["some_file2"]

                  fileTags: ["module.input"]

                  someModule.outputTag: "some_tag2"

               }

              someModule.possibleTags: ["some_tag1", "some_tag2"]
      }

      // someModule
      Module {
          property string outputTag: "default_tag"
          property stringList possibleTags: [outputTag] // Use this property if you specify tags inside a `Group`

          Rule {
              inputs: ["rtLocalizer.input"]

              outputFileTags: product.someModule.possibleTags

              outputArtifacts: {
                  return {

                      filePath: input.completeBaseName,

                      fileTags: [input.someModule.outputTag]

                  };
              }
          }
      }

       

      As you can see, I have to use `possibleTags` property, to explicitly specify possible output tags.

      But if qbs enable to use input inside `fileTags`, I can simplify the code:

      Product {

              Group {
                      files: ["some_file1"]

                      fileTags: ["module.input"]           

                      someModule.outputTag: "some_tag1"         }

              Group {

                      files: ["some_file2"]

                  fileTags: ["module.input"]

                  someModule.outputTag: "some_tag2"

               }

      }

      // someModule
      Module {

          property string outputTag: "default_tag"

          Rule {
              inputs: ["rtLocalizer.input"]

              Artifact {

                  filePath: input.completeBaseName,

                  fileTags: [input.someModule.outputTag]

              }

          }
      }

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            lo1ol Petr Mikhalitsyn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes