[PATCH] D82964: [clangd] Config: loading and caching config from disk.

2020-07-04 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8bd000a65fe4: [clangd] Config: loading and caching config from disk. (authored by sammccall). Changed prior to commit: https://reviews.llvm.org/D82964?vs=275384=275484#toc Repository: rG LLVM Github

[PATCH] D82964: [clangd] Config: loading and caching config from disk.

2020-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82964/new/ https://reviews.llvm.org/D82964

[PATCH] D82964: [clangd] Config: loading and caching config from disk.

2020-07-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/ConfigProvider.cpp:39 +auto Buf = FS.getBufferForFile(Path); +// If stat() succeeds but we failed to read, retry once and cache failure. +if (!Buf) kadircet wrote: > why do we want

[PATCH] D82964: [clangd] Config: loading and caching config from disk.

2020-07-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 275384. sammccall marked 2 inline comments as done. sammccall added a comment. Don't cache failed opens. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82964/new/ https://reviews.llvm.org/D82964 Files:

[PATCH] D82964: [clangd] Config: loading and caching config from disk.

2020-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/ConfigProvider.cpp:39 +auto Buf = FS.getBufferForFile(Path); +// If stat() succeeds but we failed to read, retry once and cache failure. +if (!Buf) why do we want to cache failure

[PATCH] D82964: [clangd] Config: loading and caching config from disk.

2020-07-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 275165. sammccall added a comment. Try to get the tests to pass on windows. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82964/new/ https://reviews.llvm.org/D82964 Files:

[PATCH] D82964: [clangd] Config: loading and caching config from disk.

2020-07-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 275146. sammccall marked 5 inline comments as done. sammccall added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82964/new/ https://reviews.llvm.org/D82964 Files:

[PATCH] D82964: [clangd] Config: loading and caching config from disk.

2020-07-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 15 inline comments as done. sammccall added inline comments. Comment at: clang-tools-extra/clangd/ConfigProvider.cpp:39 +std::vector ) { +assert(llvm::sys::path::is_absolute(Path)); +auto FS = TFS.view(/*CWD=*/llvm::None);

[PATCH] D82964: [clangd] Config: loading and caching config from disk.

2020-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks looks really cool! Comment at: clang-tools-extra/clangd/ConfigProvider.cpp:39 +std::vector ) { +assert(llvm::sys::path::is_absolute(Path)); +auto FS = TFS.view(/*CWD=*/llvm::None); I believe this function is

[PATCH] D82964: [clangd] Config: loading and caching config from disk.

2020-07-02 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/ConfigProvider.h:59 + + // Reads fragments from a single YAML file with an fixed path. + static std::unique_ptr fromYAMLFile(llvm::StringRef AbsPathPath, `a` fixed path Repository: rG

[PATCH] D82964: [clangd] Config: loading and caching config from disk.

2020-07-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: cfe-commits, usaxena95, jfb, arphaman, jkorous, MaskRay, ilya-biryukov, mgorny. Herald added a project: clang. The Provider extension point is designed to also be implemented by ClangdLSPServer (to