[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 15 18:40:02 PDT 2019


thakis added a comment.

In D58418#1431399 <https://reviews.llvm.org/D58418#1431399>, @jkorous wrote:

> In D58418#1430630 <https://reviews.llvm.org/D58418#1430630>, @thakis wrote:
>
> > In D58418#1430490 <https://reviews.llvm.org/D58418#1430490>, @jkorous wrote:
> >
> > > In D58418#1430160 <https://reviews.llvm.org/D58418#1430160>, @thakis wrote:
> > >
> > > > Why is this needed for index-while-building? My mental model for index-while-building is that that streams out build index metadata as part of the regular compile. Why does that require watching directories?
> > >
> > >
> > > You're right that this isn't necessary for the indexing phase. But we also provide API so clients can consume the index. This functionality is used for getting notifications about index data changes.
> > >
> > > You can see it for example here:
> > >  https://github.com/apple/swift-clang/blob/stable/lib/IndexDataStore/IndexDataStore.cpp#L111
> >
> >
> > Is that code going to live in clang? This seems more like a tool built on top of the compiler rather than something core to the compiler itself (like the actual index-while-building feature). Maybe this could be in clang-tools-extra?
>
>
> It actually is part of the feature as the serialized format of the index isn't meant as a stable interface, that's what the API is for. DirectoryWatcher isn't a tool, it's just part of implementation of the IndexStore API.


Maybe I misunderstand what the client of the IndexStore API is. That's not code that will be in the clang binary, right?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58418/new/

https://reviews.llvm.org/D58418





More information about the cfe-commits mailing list