alexmurray / ccls-snap

ccls in a snap

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ccls using very old version of clang

madscientist opened this issue · comments

I am not able to use this snap as it's not able to correctly parse my code.

I notice that this snap is built against Clang version 7:

$ ccls --version
ccls version 0.20220729-0-g74458915
clang version 7.0.0-3~ubuntu0.18.04.1 (tags/RELEASE_700/final)

That's a pretty old version of Clang and while it might be fine for C, there have been a lot of enhancements in C++ since 2018 when Clang 7 was released.

Thanks for reporting this - I have just pushed an update to the snap so it should use clang-12 now instead. See 58bfa99. A new snap should be built soon and will publish to the edge channel automatically - if you could also test this and let me know if it is working as expected then we can promote it to stable.

The new snap build is now available on edge - please upgrade and test if you can. sudo snap refresh --edge ccls)

Unfortunately it doesn't work, although in a different way than the clang 7 version.

The clang 7-based version parses my project but marks my newer C++ code as an error, as you might expect. So I can jump around the code etc. as expected as long as it's "old style" C++.

This version of ccls doesn't parse anything: just sends back an error to the client: "not indexed (Invalid Request)". I've had this same problem with ccls I've built myself with any version of clang higher than clang 11. With clang 11 it works fine (at least insofar as clang 11 supports newer C++), but with clang 12 or above it doesn't work at all and just sends back the above error. I've tried it even with the latest clang 16. If I enable debug logging for ccls, I see plenty of normal-looking messages but no errors or warnings etc. So I have no idea what is going on but there's something about ccls that doesn't work with clang 12 or above.

MaskRay is a huge contributor to GCC/clang/binutils and an amazing coder but they don't seem to have much time or interest in maintaining ccls, so I've never gotten myself motivated to put in the effort to debug this problem... I really don't have the time to learn the ccls codebase and without any error message etc. I don't have the first idea where to start.

Honestly I've moved over to clangd at this point. But, I'm still willing to test out some things if someone else wants to put in the effort.

I updated the snap to instead use clang-11 - if you could test, that would be great.

Sorry for the delay: yes this version works fine (at least insofar as features supported by Clang 11).

Thanks for this effort!

Thanks for letting me know - I will close this issue then.