[PATCH] D79302: [clangd] Propogate context in LSPServer tests

2020-05-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet abandoned this revision. kadircet added a comment. as discussed offline there is no real use case for this now and it is unclear whether there will be. dropping it, until we've got a use case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D79302: [clangd] Propogate context in LSPServer tests

2020-05-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 261717. kadircet added a comment. - Drop LSP latency test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79302/new/ https://reviews.llvm.org/D79302 Files:

[PATCH] D79302: [clangd] Propogate context in LSPServer tests

2020-05-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 261715. kadircet added a comment. - Call sync instead of waiting on context destruction Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79302/new/ https://reviews.llvm.org/D79302 Files:

Re: [PATCH] D79302: [clangd] Propogate context in LSPServer tests

2020-05-03 Thread Kadir Çetinkaya via cfe-commits
i was trying to provide a more generic "callback" mechanism, but you are right, it is not needed for this test. going to keep context prop logic though, as it might be necessary later on. SG? On Sun, May 3, 2020 at 9:09 PM Sam McCall via Phabricator < revi...@reviews.llvm.org> wrote: >

[PATCH] D79302: [clangd] Propogate context in LSPServer tests

2020-05-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/unittests/ClangdLSPServerTests.cpp:164 +WithContextValue Ctx( +llvm::make_scope_exit([] { CallFinished.notify(); })); +llvm::consumeError(Client.call(MethodName, {}).take().takeError());

Re: [PATCH] D79302: [clangd] Propogate context in LSPServer tests

2020-05-03 Thread Sam McCall via cfe-commits
On Sun, May 3, 2020, 3:22 PM Kadir Cetinkaya via Phabricator < revi...@reviews.llvm.org> wrote: > kadircet marked 3 inline comments as done. > kadircet added inline comments. > > > > Comment at: clang-tools-extra/clangd/unittests/LSPClient.cpp:120 > + auto Req =

[PATCH] D79302: [clangd] Propogate context in LSPServer tests

2020-05-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 3 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/LSPClient.cpp:120 + auto Req = std::move(Requests.front()); + // Leave request on the queue so that waiters can see it. Lock.unlock();

[PATCH] D79302: [clangd] Propogate context in LSPServer tests

2020-05-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 261694. kadircet marked an inline comment as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79302/new/ https://reviews.llvm.org/D79302 Files:

[PATCH] D79302: [clangd] Propogate context in LSPServer tests

2020-05-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Hmm, I wonder if we should have a Context.bind(function) -> function. I guess it runs into the usual thing of not being able to deduce a functor's signature, so you get an ugly templated return type.. Comment at:

[PATCH] D79302: [clangd] Propogate context in LSPServer tests

2020-05-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This enables users to wait until async request completes. Taking a response isn't enough, as receiving