Details
-
Suggestion
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
2.0.1
-
None
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]
}
}
}