[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE350847: [clangd] Introduce loading of shards within auto-index (authored by kadircet, committed by ). Changed prior to commit: https://reviews.llvm.org/D55224?vs=181072&id=181075#toc Repository: rC

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. Ship it! Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55224/new/ https://reviews.llvm.org/D55224

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 181072. kadircet marked 2 inline comments as done. kadircet added a comment. Address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55224/new/ https://reviews.llvm.org/D55224 Files: clangd/index/Back

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Only one important comment about bringing back the comment. Comment at: clangd/index/Background.cpp:224 +auto NeedsReIndexing = loadShards(std::move(ChangedFiles)); +// Run indexing for files that needs to be updated. +std:

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 181044. kadircet marked 10 inline comments as done. kadircet added a comment. Address comments & revert last changes Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55224/new/ https://reviews.llvm.org/D55224 Fil

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. As discussed offline, let's remove the parts of the change that were aiming to fix the consistency issues, the issues were there before this patch, the fix is getting complicated and doesn't really solve all of the problems. All of that suggests it's out of scope

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/URI.h:131 +/// Resolves URI to file paths with cache. +class URIToFileCache { +public: Maybe move it into the `Backgroud.cpp`, e.g. as a private member of `BackoundIndex`? We don't have other use-case for i

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/Background.cpp:259 + // if this thread sees the older version but finishes later. This should + // be rare in practice. + DigestIt.first->second = Hash; ilya-biryukov wrote: > kadircet wrote:

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 180859. kadircet marked 12 inline comments as done. kadircet added a comment. Address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55224/new/ https://reviews.llvm.org/D55224 Files: clangd/URI.cpp

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/SourceCode.h:21 #include "clang/Tooling/Core/Replacement.h" +#include "llvm/Support/Path.h" #include "llvm/Support/SHA1.h" Looks redundant. Remove? Comment at: clangd/index/Background.cp

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. There seems to be no unexpected changes after rebase Comment at: clangd/index/Background.cpp:259 + // if this thread sees the older version but finishes later. This should + // be rare in practice. + DigestIt.first->second = Hash; --

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 180823. kadircet marked 8 inline comments as done. kadircet added a comment. Address comments && rebase Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55224/new/ https://reviews.llvm.org/D55224 Files: clangd/

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/index/Background.cpp:197 +Cmd.CommandLine.push_back("-resource-dir=" + ResourceDir); +const std::string FileName = Cmd.Filename; +if (auto Error = index(std::move(Cmd), Storage)) use

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/SourceCode.h:107 +// "/tmp/build/foo.h" +std::string makeCanonicalPath(llvm::StringRef AbsolutePath, + const SourceManager &SM); This changes should go away after the rebase, rig

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/index/Background.cpp:259 + // if this thread sees the older version but finishes later. This should + // be rare in practice. + DigestIt.first->second = Hash; kadircet wrote: > ilya-biryukov w

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-08 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/Background.cpp:259 + // if this thread sees the older version but finishes later. This should + // be rare in practice. + DigestIt.first->second = Hash; ilya-biryukov wrote: > kadircet wrote:

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-08 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 180706. kadircet marked 23 inline comments as done. kadircet added a comment. Address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55224/new/ https://reviews.llvm.org/D55224 Files: clangd/SourceCod

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2019-01-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Most comments are NITs, the major one that I'd suggest paying most attention to is about rewriting newer results with an older ones. Comment at: clangd/index/Background.cpp:259 + // if this thread sees the older version but finishes later. T

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/Background.cpp:259 + // if this thread sees the older version but finishes later. This should + // be rare in practice. + DigestIt.first->second = Hash; ilya-biryukov wrote: > > "should be ra

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 178675. kadircet marked 20 inline comments as done. kadircet added a comment. - Address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55224/new/ https://reviews.llvm.org/D55224 Files: clangd/SourceC

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 4 inline comments as done. kadircet added a comment. Sending out everything related to canonical path at: D55818 Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55224/new/ https://reviews.llvm.org/D55

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2018-12-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Probably the most important suggestion from my side is trying to clearly separate the `enqueue` calls (which actually schedule rebuilds of TUs) using clang and the `loadShards` function. The index loading should be fast, so I assume we won't win much latency by sc

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2018-12-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 177005. kadircet added a comment. - Fix a few problems that come up in the field test. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55224/new/ https://reviews.llvm.org/D55224 Files: clangd/SourceCode.cpp

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2018-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric. Whenever a change happens on a CDB, load shards associated with that CDB before issuing re-index actions. Repository: rCTE Clang Tools Extra htt