[RFC] Buildtools and Language Support
wongk at seapine.com
Fri Jul 13 12:38:42 UTC 2007
> -----Original Message-----
> From: Andreas Pakulat
> Roberto already mentioned this somewhere in the "qmake third
> Buildsystems such as qmake, cmake and even automake (especially the
> autoconf part) have a simple programming language to do "advanced"
> things (like creating dependecies between different subprojects,
> executing commands to generate source....). So I (and obviously also
> Roberto) am thinking: Why don't we create language plugins for such
> advanced buildsystems?
> Reasoning: We already create parsers for each language and AST's, we
> also build structures on top of that to resolve variable values,
> evaluate certain functions (cmake macro's, qmake functions). So IMHO
> we're already doing pretty much everything a language plugin for the
> qmake or cmake language would do. A DUChain for QMake or
> CMake files may
> help to ease the implementation of these things, I think and
> maybe even
> implementing the "typing-help" that seemingly both CMake and QMake
> support are aiming at for advanced project buildsystems.
> I'm not sure wether this would be 2 separate plugins or
> wether its just
> one plugin implementing both buildsystem and language API.
The only reason I can see that you may want to separate the two is if we
want the user to have code completion when editing a project file (i.e.,
CMakeLists.txt) when a project of this type is not loaded, and you don't
want the overhead of loading the build-system stuff at that point.
Personally I would recommend keeping it all together in one plugin.
> So what do those that already worked on language plugins in KDevelop4
> think about it? Does it make sense? Am I overlooking thins in both
> language and buildsystem support that make this unpleasant or
My main concern would be whether the language constructs for each of
these build systems could easily represented by the duchain, or whether
there would have to be a lot of work done for this to function properly.
Other than that it seems like a good idea. If there are enough
similarities that we don't end up making complete specializations of the
duchain for each build system (in which case we are not really gaining
anything), then I'd say it at least worth looking into. To get code
completion for a build system file (assuming it was implemented in the
plugin), it would be simpley a matter of letting the language controller
know that the langauge support is loaded and having a proper MIME type.
More information about the KDevelop-devel