Re: [Qbs] How to use texttemplate module?

2020-09-10 Thread Jochen Ulrich
> wouldn't it be a good idea to add
> 
> additionalProductTypes: [product.texttemplate.outputTag]
> 
> to the texttemplate module?

I think that's wrong.

Because if the output of the text template should be processed further (for 
example, it creates a .cpp file which should be compiled into an application or 
library), then the output artifacts need to have a corresponding tag set via 
the ` texttemplate.outputTag` property.
And if the texttemplate module would set `additionalProductTypes: 
[product.texttemplate.outputTag]` then the Product containing the template 
would also get these tags (for example "cpp") which is wrong (it's an 
application/library, not a cpp file).

Best
Jochen

___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] How to use texttemplate module?

2020-09-10 Thread Richard Weickelt
> But then, wouldn't it be a good idea to add
> 
> additionalProductTypes: [product.texttemplate.outputTag]
> 
> to the texttemplate module? I see that several other modules are doing
> something like that. Would you consider a patch adding it?

I think the purpose of the text template module is to create intermediate 
artifacts that are consumed by other rules. This is also the reason for a 
configurable outputTag property. You can make the output a "final" artifact by 
customizing the product type manually as explained earlier. So I consider the 
current behavior to be the least surprising. But this is more my own opinion. 
If you can think of a good reason to adjust the additionalProductTypes 
property, then go ahead.

Richard
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs