[PATCH] D65387: [clangd] Add a callback mechanism for handling responses from client.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 1 01:51:14 PDT 2019


hokein added inline comments.


================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:266
         elog("No reply to message {0}({1})", Method, ID);
         assert(false && "must reply to all calls!");
         (*this)(llvm::make_error<LSPError>("server failed to reply",
----------------
hmm, we will trigger this assertion when clangd exits but not all requests are replied by the client, options:

1) remove the assertion here, but the error message "server failed to reply" returned is misleading, in this case, this is a client failure, not server
2) make sure that all reply callbacks are called, e.g. run the pending reply callback in destructor (returning an LSP error to client)



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65387





More information about the cfe-commits mailing list