<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Feb 28, 2018 at 11:40 PM Marc-André Laperle via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_6186312694321089884divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p style="margin-top:0;margin-bottom:0"></p>
<div>
<div dir="ltr">
<div id="m_6186312694321089884x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p style="margin-top:0;margin-bottom:0"><span style="font-size:12pt">Hello,</span><br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I would like to discuss Cquery [1] in the light of the current development of Clangd. Both tools implement the Language Server Protocol for C/C++. Cquery seems to be picking up a lot of features which users are interested
in. Some differences with Clangd are that it uses libclang and it is developed on Github outside of the LLVM/Clang tree. Perhaps that Clangd has the advantage of having more visibility as it is hosted within the Clang community and has healthy (long term??)
development activity. But being out of tree, Cquery also has some flexibility in reusing more third-party library and features are rapidly being prototyped.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">With that said, should we make an effort to bridge the two projects?</p></div></div></div></div></div></blockquote><div><br></div><div>I don't think either side will be really interested in this - there are pretty different fundamental approaches to the two projects.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div id="m_6186312694321089884divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr"><div><div dir="ltr"><div id="m_6186312694321089884x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p style="margin-top:0;margin-bottom:0">I would very much like to hear your thoughts on Cquery, especially from fellow Clangd developers.</p></div></div></div></div></div></blockquote><div><br></div><div>Competition is good :)</div><div>Clangd has made some architectural choices that are fundamentally playing a more long-term game, so it's not surprising that cquery is leading with features.</div><div>The big differences are:</div><div>- cquery is based on libclang, while clangd directly works with the AST and provides a non-LSP C++ interface to be integrated as service in larger environments - this lets clagnd work in places where libclang is hard to integrate</div><div>- clangd wants to integrate with other folks in the community on indexing interfaces and mechanisms that provide a platform for tools to work on; while there is also some prototyping, a lot of work goes into designing the right system</div><div>- clangd puts scale and performance first; for very very large code bases (significantly larger than chromium), this is a precondition, and (together with the previous item) why we don't have a global index yet</div><div>- clangd work currently focuses on making code completion really good, so quite a bit of work has gone into how to split the preamble and making completion results better (which also benefits cquery \o/)</div><div><br></div><div>The hope is that clangd at some point will catch up with cquery, but as those things go, in the end they will probably have slightly different trade-offs, so some folks will use one while others use the other. In principle that's the nice thing about the LSP; competition is now possible :)</div><div><br></div><div>For everyone interested, come join the talk on clangd at the Euro LLVM in Bristol; that talk will include a more detailed comparison between the two approaches.</div><div><br></div><div>Cheers,</div><div>/Manuel</div></div></div>