[cfe-dev] [clangd] Newcomers guide

Ilya Biryukov via cfe-dev cfe-dev at lists.llvm.org
Thu Aug 2 03:17:42 PDT 2018


Hi Balogh,

It's not that bad, e.g. last time I checked the index for LLVM takes
<200MB. That's not small, but manageable.
Obviously, larger projects may end up being really huge, but I still
encourage you to try it out, maybe it'll work for your use-case too.

But you're definitely right, keeping some of the index out of memory might
turn out to be hard requirement for larger projects.

On Wed, Aug 1, 2018 at 9:02 PM Balogh Tamas via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hi Eric,
>
> A possible use case when I would like to analyze a huge C++ project with
> CodeChecker [1] and use clangd to help me with the jump to definition
> feature.
>
> So, I am assume that the yml file could be relative big for extremely big
> projects and in this case I wouldn't want to generate it for all files. It
> could be generated separately for translation units. And if I am requesting
> the locations for different definitions from different translation units
> the index yml file can be dynamically reloaded.
>
> This is just an idea but I hope I formulate it clear and easy to
> understand.
>
> [1] - https://github.com/Ericsson/codechecker
>
> Best regards,
> Tamas
>
> On Jul 31, 2018, at 11:52 AM, Eric Liu <ioeric at google.com> wrote:
>
> +clangd-dev at lists.llvm.org <clangd-dev at lists.llvm.org>
>
> Hi Balogh, welcome to clangd! ;)
>
> On Tue, Jul 31, 2018 at 9:46 AM Balogh Tamas via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
>> Hello everyone,
>>
>> I try to explore clangd, especially clangd - jump to definition but I am
>> bit stuck. I don’t know how to start it.
>
>
>> As far as I know for this feature I need to start clangd with a special
>> ‘index.yml’ file, how can I generate it?
>>
> Note that the yaml symbol table is experimental only, but if you want to
> try it out, you can use global-symbol-builder
> <https://github.com/llvm-mirror/clang-tools-extra/blob/master/clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp> to
> generate the yaml symbol table. Eventually, we would like to switch to
> index-while-build (when it's landed) as a source of clangd symbol data.
>
>>
>> When clangd is running can I change this yml file? Can clangd dynamically
>> reload it?
>>
> Currently, the static index (e.g. yaml index on a codebase) is only loaded
> once in the beginning of a clangd instance. The assumption was that clangd
> instance is restarted more frequently than the updates of static index.
> clangd also has dynamic index which indexes the open/active files in a
> clangd session and acts as an overlay on top of the possibly stale static
> index. But I can see how reloading static index in clangd can be useful,
> especially when we have index-while-build in the future.
>
> I'm interested in your use case for reloading static index. Would you mind
> elaborating it a bit?
>
> Cheers,
> Eric
>
>>
>> In default how can I send a request to it?
>>
>> These are basic questions I know but I didn’t find a detailed
>> documentation for newcomers, so I am really appreciate for any comment. :)
>>
>> Thank you!
>>
>> Best regards,
>> Tamas
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>


-- 
Regards,
Ilya Biryukov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180802/c36fe248/attachment.html>


More information about the cfe-dev mailing list