This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Move remote-index dependency from clangDaemon to ClangdMain
ClosedPublic

Authored by kadircet on Nov 20 2020, 4:06 AM.

Details

Summary

This is a hack to prevent cyclic dependency between clangDaemon and
remote-index-marshalling.

Diff Detail

Event Timeline

kadircet created this revision.Nov 20 2020, 4:06 AM
kadircet requested review of this revision.Nov 20 2020, 4:06 AM
sammccall accepted this revision.Nov 20 2020, 6:22 AM
sammccall added inline comments.
clang-tools-extra/clangd/index/ProjectAware.h
25–26

while here, IndexGenerator -> IndexFactory, and "can be use to customize" --> "specifies" now that it's mandatory

clang-tools-extra/clangd/tool/ClangdMain.cpp
558

This sort of a comment seems to be rebutting the previous version of the code, which is important today but probably not in the long run.

It may not be needed at all - this factoring actually looks more natural than I expected!
If it is, I think it belongs on createProjectAwareIndex rather than here, as an aside.
(IndexFactory must be injected because this code cannot depend on the remote index client)

561

maybe just loadExternalIndex, which more clearly describes what it *does* as opposed to where it's passed.

This revision is now accepted and ready to land.Nov 20 2020, 6:22 AM
kadircet updated this revision to Diff 306839.Nov 21 2020, 5:02 AM
kadircet marked 3 inline comments as done.
  • Address comments
This revision was landed with ongoing or failed builds.Nov 22 2020, 12:13 PM
This revision was automatically updated to reflect the committed changes.