[QBS] Heads up: Deprecating the Transformer item
Christian Kandeler
christian.kandeler at qt.io
Thu May 12 09:47:56 CEST 2016
Good morning*,
right from the beginning, the Transformer item was an odd one, its
inputs being file paths instead of tags. As the Rule item evolved,
Transformers fell more and more behind, and when we introduced "dynamic"
rules, they stopped playing well with the rest of qbs and probably
should have been removed at that point.
Well, better late than never: We are deprecating Transformers for qbs
1.6 and we will remove support for them entirely in qbs 1.7.
Here's the transition guide:
Case 1: Your Transformer has inputs, i.e. it looks like this:
Transformer {
inputs: ["somefile.txt"]
Artifact { ... }
...
prepare: { ... }
}
Instead, give "somefile.txt" the tag "sometag" and now
write:
Rule {
inputs: ["sometag"]
Artifact { ... }
...
prepare: { ... }
}
That's it. You can do that right now, as a Transformer
was never required for this sort of thing.
Case 2: Your Transformer has no inputs, i.e. it looks like this:
Transformer {
Artifact { ... }
...
prepare: { ... }
}
Instead, write this:
Rule {
multiplex: true
Artifact { ... }
...
prepare: { ... }
}
Note: This is *not* possible using a current release,
as rules with no inputs will only be supported from qbs 1.6
onwards (the feature is already available in the master
branch, though). We recommend you do this kind of change
soon after qbs 1.6 is released.
Thank you for your attention,
Christian
*local time of day might differ depending on location
More information about the Qbs
mailing list