[PATCH] D51725: Allow un-setting the compilation database path
Simon Marchi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 13 06:06:18 PDT 2018
simark added a comment.
In https://reviews.llvm.org/D51725#1232748, @ilya-biryukov wrote:
> If this setting exposed directly the users in Theia or is it something that is exposed via a custom UI (e.g. choosing named build configs or something similar)?
It is through a custom UI, that we name exactly that, build configurations. There is an example of the corresponding configuration here:
https://github.com/theia-ide/theia/blob/master/packages/cpp/README.md
>> I'll investigate how difficult it is to make our frontend (Theia <https://github.com/theia-ide/theia>) restart clangd when the user switches compilation database.
>
> If that is feasible, might allow removing some code from clangd. Though don't expect that amount to be too high.
> One potential complication to restoring the state of the language server. It should be just the list of open files, but I may be missing something.
I am not sure I understand correctly your last point. Of course, when restarting clangd, we need to send again a `didOpen` for each file the user has currently open in the editor. But that should be it?
> If you'll decide to go with an option to reset the path, see the comment about making empty path special. `Optional<Optional<>>` does not play nicely with json serialization code and hard to read (even though it does look like the right thing to do from the type system perspective).
Yes, noted. I preferred to avoid giving a special meaning to an empty string because we could avoid it. But I wouldn't mind changing it if we go that route.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51725
More information about the cfe-commits
mailing list