ilya-biryukov added a comment.

In https://reviews.llvm.org/D39571#1005926, @malaperle wrote:

> I haven't looked at the newest patch yet but I gave it a quick try and saw 
> something odd. If I change the configuration to something invalid (say I 
> specify the path to a CMakeLists.txt), then I get many errors/diagnostics, 
> which is normal. But then when I change the config to something valid, the 
> same diagnostics re-emitted, as if the configuration failed to change. I'll 
> check the code tomorrow a bit but I thought I'd share this with you early.


Maybe you were still seeing diagnostics from the older versions of the files? 
clangd should **eventually** produce the right diagnostics, but if processing 
of some of the requests is in-flight at the time there results may still be 
reported.
BTW, I don't know if you've seen it before, but there's `-input-mirror-file` 
option to clangd that records the lsp input which can be used to rerun clangd 
later.

  # This should be run by VSCode (or Theia)
  clangd -input-mirror-file=/tmp/clangd.input
  
  # Later we can rerun from command line
  $ clangd < /tmp/clangd.input
  # Pass the flag to execute everyhing on one thread
  $ clangd -run-synchronously < /tmp/clangd.input

This is useful to debug/rerun and see the logs, etc.

This patch is good to go after remove `std::future<>`  from 
`reparseOpenedFiles`, unless @malaperle discovers there are other problems. 
Ideally, it'd be also nice to have a test for it.



================
Comment at: clangd/ClangdServer.cpp:541
 
+std::vector<std::future<void>>
+ClangdServer::reparseOpenedFiles() {
----------------
We're not returning futures from `forceReparse` anymore, this function has to 
be updated accordingly.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D39571



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to