[PATCH] D59605: [clangd] Introduce background-indexer

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 12 01:39:31 PDT 2019


Replies inline.

On Thu, Apr 11, 2019 at 7:59 PM Sam McCall <sammccall at google.com> wrote:

> Thanks - I think there's quite a lot of background missing here:
>
Indeed, here are clarifications.

> what/who is this for,
>
Building the index for clangd without actually running clangd it seems
useful, e.g. for cases when you want to share the index (would require the
same code paths, but already potentially useful).

> why a separate binary from clangd-indexer
>
We discussed this and reusing clangd-indexer could be an option too. There
are mainly two reasons:
- Implementations are very different (should they be?), avoid corresponding
complexities in the code.
- If we decide to have only one index format later, deprecating and
removing either of the tools is simple than considerably changing semantics
of a single tool.

(or and how do they relate, how much of the BackgroundIndex code structure
> makes sense with multiple users.
>
The idea is that eventually background-indexer is the default tool to bring
the index up-to-date and clangd-indexer can be deprecated (I hope we'll end
up with a single on-disk representation eventually).
Wrt to the code structure, the only thing that we're interested in the
context of the tool is the on-disk index format of the index.
The rest of the code in BackgroundIndex we're actually fighting with to
make this work, see other comments about exposing a different API that
captures the intention of this use-case (one-shot update of the index)
better.


> I assume there's been some offline discussion about this, but i missed it
> :-)
>
> On Thu, Apr 11, 2019, 18:16 Ilya Biryukov via Phabricator <
> reviews at reviews.llvm.org> wrote:
>
>> ilya-biryukov added a comment.
>>
>> To make it clear, I think the question is not just "which part of
>> functionality is missing in BackgroundIndex", it's rather "which part of
>> BackgroundIndex we **don't** need".
>>
>>
>> Repository:
>>   rG LLVM Github Monorepo
>>
>> CHANGES SINCE LAST ACTION
>>   https://reviews.llvm.org/D59605/new/
>>
>> https://reviews.llvm.org/D59605
>>
>>
>>
>>

-- 
Regards,
Ilya Biryukov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190412/48c3092b/attachment.html>


More information about the cfe-commits mailing list