<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 6, 2014 at 9:26 AM, Milian Wolff <span dir="ltr"><<a href="mailto:mail@milianw.de" target="_blank">mail@milianw.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class=""><div class="h5">On Wednesday 06 August 2014 03:58:38 Aleix Pol wrote:<br>
> Hi,<br>
> Now this is the e-mail where I'm a newbie after working on KDevelop for 7<br>
> years :D.<br>
><br>
> As you'll have seen, I've been changing things in the cmake, one of the<br>
> things to have changed is how we populate the DUChain, we will use parse<br>
> jobs now.<br>
><br>
> Now I think we'll need to treat it a bit specially, given that in cmake we<br>
> need to have the scripts processed in a specific order so that we know<br>
> where things actually come from.<br>
><br>
> Now I would like some feedback from the people who have been working on<br>
> other language supports to give me a hand figure this out, so I can start<br>
> pushing this with confidence.<br>
><br>
> Let's put it in perspective, we need to be able to include the backtrace of<br>
> the file every time we parse a file, so if we're doing:<br>
> - src/CMakeLists.txt: we will need /CMakeLists.txt<br>
> - cmake/FindCocoloco.cmake: we will need src/CMakeLists.txt, which in turn<br>
> needs CMakeLists.txt<br>
><br>
> Also we need to be able to wait the processing of the files until the<br>
> dependencies are not ready.<br>
<br>
</div></div>Hey Aleix,<br>
<br>
great work. Good to see this happening! I wonder though: From the commit<br>
message it reads as if "only" defines and include paths are read directly from<br>
CMake, nothing else. What else would there be? I.e. what exactly is it that<br>
you need from CMake but don't get, yet? As I mentioned before, once we have a<br>
properly documented spec of whats required on our side, we can approach the<br>
CMake guys and ask for help from their side.<br></blockquote><div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
That said, what do you need the backtrace and dependencies for when<br>
processingthe cmake stuff for language support? You should not need to<br>
evaluate anything there, hence I don't see the need for proper<br>
backtraces/dependencies. CMake would just be another scripting language, such<br>
as QML/JS or PHP or Python in that regard. You'd just parse files and offer<br>
code completion based on built-in cmake stuff which you'll need to get from<br>
somewhere (cmake documentation?) and whatever you deem useful in a project-<br>
wide context (and can access through the persistent symbol table then). PHP<br>
does it like this: Parse a file once, if anything was missing/unknown,<br>
reschedule once with lower priority.<br>
<br>
Bye<br>
<span class=""><font color="#888888"><br></font></span></blockquote><div><br>Well, to create a proper duchain we want to be able to see what set() call is the one that declares the variable. Or well, for macros as well, we can't have the declaration until it's been processed, and imports in CMake are specified by the code flow, rather than explicit imports.<br>
<br>Aleix<br></div></div><br></div></div>