[Qbs] Evaluation of Conditional Depends

Richard Weickelt richard at weickelt.de
Wed Jun 10 11:37:02 CEST 2020


> 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?

... And module properties set in the profile. I had a glance look at the source code. When evaluating the condition property, we are taking the following information from the product context into account:

- module values set in the profile (can even be a local profile within the product item)
- a fully(?) resolved instance of the qbs module

The result is then cached since this module might be loaded multiple times in the same product context. I don't see why we could not allow access to product as well as project properties and module properties set in the product item.

Christian, is that restriction by purpose?


More information about the Qbs mailing list