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

Matthew Woehlke mwoehlke.floss at gmail.com
Mon Dec 11 20:35:16 GMT 2017

On 2017-12-11 14:32, René J.V. Bertin wrote:
> On Monday December 11 2017 12:26:16 Matthew Woehlke wrote:
>> Repeating the experiment with some other projects, I get:
>>              3.10     master
>> KDevelop:   4.6 MiB   2.9 MiB
> KDevelop (the 5.2 branch) only gives me a 0.004Mb reply (plus those <= 1k which I don't track).

Are you sure you're looking at the *code model*? That would require an
average of only 3 bytes per Ninja target. Even given that CMake targets
and Ninja targets are not one-to-one, 4 KiB seems... unlikely.

If that's *really* what you're looking at, I'd be interested to know
what's in my code model (attached; xz-compressed with paths replaced by
placeholders) that isn't in yours.

The attached .txt file can be fed as stdin (after replacing the dummy
paths with real paths) to `cmake -E server --debug --experimental` to
generate the code model (plus a bunch of other responses; the actual
code model will be the second-last line of the output). If you try that
experiment with KDevelop, how large is the total output? (In my
experience, the total output size is heavily dominated by the size of
the code model, so just looking at the total size is a good ballpark
estimate for the size of the code model.)

> Is it possible to invoke the cmake server with -Wno-dev? Failing to 
> add that argument on the command line can increase the output
> considerably.

Not to my knowledge, but why would you expect that to affect the code model?

I think maybe you are confusing the output of CMake configure / generate
(i.e. the server "configure" and "compute" commands) with the CMake code
model (server "codemodel" command)?

-------------- next part --------------
[== "CMake Server" ==[
    "buildDirectory": "/usr/local/build/matthew/kde/kdevelop",
    "protocolVersion": {
        "major": 1
    "sourceDirectory": "/usr/local/src/matthew/kde/kdevelop",
    "type": "handshake"
]== "CMake Server" ==]

[== "CMake Server" ==[
  "cacheArguments": [],
  "type": "configure"
]== "CMake Server" ==]

[== "CMake Server" ==[
  "type": "compute"
]== "CMake Server" ==]

[== "CMake Server" ==[
  "type": "codemodel"
]== "CMake Server" ==]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdevelop-codemodel.json.xz
Type: application/x-xz
Size: 46424 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20171211/2a5343cf/attachment.xz>

More information about the KDevelop mailing list