[Qbs] Evaluation of Conditional Depends

Richard Weickelt richard at weickelt.de
Wed Jun 10 10:33:59 CEST 2020



Christian Kandeler wrote on 10. June 2020 10:09 (GMT +02:00):

> On Tue, 9 Jun 2020 20:55:43 +0200
> Christian Gudrian <qbs at gudrian.org> wrote:
> 
>> Could it be that only a restricted set of variables is available during
>> evaluation of the module’s „condition“ property? Neither
>> „product“ nor any imported modules’ variables can be accessed
>> („Can’t find variable“ error).
>> 
>> Is that a known limitation or am I doing something wrong?
> 
> Remember that the module has not been loaded yet, so the right-hand side
> of the condition property is rather restricted in terms of what you can
> access there. Basically, it's just the qbs module.

And of course the module's own properties set in the module file, except those referring to probes. But we do evaluate the module condition in a product context. Is that not the real product context or at least very close? E.g. if product sets moduleX.propA to true and depends on moduleX, is propA then not true when evaluating the condition? At least that was my expectation in my previous reply. Also, doesn't it make sense to provide access to custom product properties in that phase?


More information about the Qbs mailing list