Current state of duchain/parser

Jakob Petsovits jpetso at gmx.at
Fri May 11 19:43:57 UTC 2007


On Friday, 11. May 2007, Kris Wong wrote:
> Since my current semester in grad school has come to and end, I expect
> to have a bit more free time and have started to look at KDevelop 4.  I
> was wondering what the state of the duchain was and what was planned in
> this area.

Ok, the state of the duchain is like this:

- It compiles. Other than that, it's pretty much in the same state as when
  Hamish stopped hacking on it, which is a few months ago.

- Note that there has not been serious work on the duchain since
  Sublime / the new plugin architecture has been merged.
  It worked before that, and it doesn't work now.

- The assert that Andreas mentioned is a direct consequence of
  locking difficulties. Hamish battled hard with multi-threading, and
  all of this seems fragile enough to break as soon as something
  unexpected happens. The other, previously found assert has been
  overcome by the Kate developers directly commenting it out in Katepart,
  but that problem has not really been solved either.
  So if you understand threading and locking well, you're at an advantage.

The plans for duchain are, in order:

- Make it work again for C++, like it did before.
  That means, let the code be painted in funny colors by which you can tell
  what variable is defined and referenced where in the code.

- Generalize it, so that it can be used for languages other than C++.
  Make the C++ one just a specialization of the general duchain.

- Get rid of the codemodel, and replace it by the combination of
  duchain + parse tree. Adam has a few good ideas there, assuming
  that the previous two goals are achieved in time.

If Hamish is still listening: we'd appreciate advice on what exactly is 
necessary and how to get there best. If you could spare some time for 
reactivating the duchain, we'd not be disappointed either.

> Since Jacob has said that he doesn't have much time to work 
> on KDevelop 4, and I am familiar with the code model, I figure this
> would probably be a good place for me to help out.

You could not possibly find any better place to help out!
Nevertheless, they still spell me with a "k", like KDE ;)

Best wishes,
  JaKob




More information about the KDevelop-devel mailing list