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:

> 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());
> 
> Sorry, I didn't really put all the pieces together in my head the first
> time around.
> The context propagation seems OK, but it's too fiddly as a way to control
> sequencing - can't you just call Client.sync() and assert after that?
>
>
> Repository:
>   rG LLVM Github Monorepo
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D79302/new/
>
> https://reviews.llvm.org/D79302
>
>
>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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 = std::move(Requests.front());
> +  // Leave request on the queue so that waiters can see it.
>Lock.unlock();
> 
> sammccall wrote:
> > which waiters? isn't it just this thread?
> i was envisioning the future(thought this already had a `blockUntilIdle`
> :D)
>
It has the "sync" method which is basically block-until-idle over LSP


>
> Repository:
>   rG LLVM Github Monorepo
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D79302/new/
>
> https://reviews.llvm.org/D79302
>
>
>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits