KDevelop can't load project: "too large document"?

René J.V. Bertin rjvbertin at gmail.com
Tue Dec 5 22:38:26 GMT 2017


On Tuesday December 05 2017 16:48:24 Matthew Woehlke wrote:

> After looking at the CMake source code: not AFAICT :'(.

Server output shouldn't become that big, even if you didn't had to wait for the entire output to be complete. Parsing something that's 20x larger than you need must come at a noticeable cost.

> I don't know (didn't look) if KDevelop is interested in them

It can clearly do without them...

> Basically, QJson took one look at the size of the data and punted. In
> particular, see also https://bugreports.qt.io/browse/QTBUG-58652.

Looking at cmakemanager.cpp that probably means that you'd need to catch errors like this in ChooseCMakeInterfaceJob::successfulConnection() and make sure the failedConnection(int) slot is called on error.

Maybe you can simply do

        connect(job, &CMakeServerImportJob::result, this, [this, job](){
            if (job->error() == 0) {
                manager->integrateData(job->projectData(), job->project());
            } else {
                failedConnection(job->error());
            }
        });

> Indeed. At the very least, it shouldn't just quit trying to import the
> project, leaving KDevelop in a weird state :-).

>From the looks of it the cmake importer doesn't do anything in terms of error handling.

> (Which is still lots more than the compile commands, but I suspect the
> code model dump, even without the traces, has more and better structured
> information.)

Yes, though I don't really miss it.

R.



More information about the KDevelop mailing list