[Qt-creator] pro file parsing in cumulative mode really necessary?
Oswald Buddenhagen
oswald.buddenhagen at nokia.com
Mon Apr 19 22:27:26 CEST 2010
On Mon, Apr 19, 2010 at 02:18:13PM +0200, ext Tilman Vogel wrote:
> Right and I guess, the right thing would be to do the concatting as a
> cartesian product, i.e. if SRCDIR = { "../srcA", "../srcB" }, then the
> include should get an array as argument { "../srcA/abc/def.pri",
> "../srcB/abc/def.pri" } (or rather be called for each of them).
>
this might work in *this* case. the complete solution is akin to solving
the halting problem ...
the general solution is evaluating each pro file with every possible
branch taken and not taken. that of course has unmanageable complexity.
on top of that, there are external inputs which the evaluator simply
cannot anticipate.
i think this might work more or less: instead of evaluating the rest of
the file from each branch point, evaluate everything just once and "tag"
every assignment with the current scope. each following statement which
has a data dependency would be executed once for each tagged variant,
restricted by compatibility with the own scope (i.e., there is no point
in evaluating win32-tagged data in a unix scope).
of course, this tagging alone is quite a science (assuming
win32/unix/macx aren't sufficient), and there is still the external
uncertainty. also, i'm not sure how that would fare with loops
complexity-wise.
all in all, i'd really like to try that, but i might have a hard time
convincing my managers to pay for it. ;)
> >> OUTPUT=$$replace(INPUT,string,)
> >> However, the implementation in profileevaluator.cpp sets OUTPUT to the
> >> empty string instead.
> >>
funny, i just found the same bug independently. :)
More information about the Qt-creator-old
mailing list