Dependencies of parse-jobs
svenbrauch at googlemail.com
Sun Feb 12 23:18:06 UTC 2012
PovAddict and I were tracking a bug (in the python plugin) a few days
ago which turned out to be caused by the order in which documents are
parsed to be wrong (as in, not like I wanted it to be, heh).
Currently, I'm doing this: If document A is parsed and an "import"
(same like #include in c++) is encountered, a parse job is created for
the imported document using
with a priority that has a lower value than the current parse job (and
thus a higher priority (who invented this?)). Then the current
document is marked as "needs update", and after the parse job
finished, it's registered for a re-parse again (that's done inside
parsejob::run) with a lower priority than it had before (I'll use the
word "priority" as everybody expects it to be used from now on):
Now, that roughly works, but not quite; sometimes, the documents are
not parsed exactly in the order their priorities suggests. I guess
that is to be expected -- but what else is there except priorities
that can be used to "sort" parse jobs?
Here's the TL;DR version: What's the "good" way of forcing document A
to be re-parsed as soon as there's a top-context for B available which
satisfies the required $minimum_features? How does C++ do this? I
looked into the code, but couldn't quite find anything related to that
(it's a huge project...).
Any help would be appreciated. :)
More information about the KDevelop-devel