This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Retire some flags for uncontroversial, stable features.
ClosedPublic

Authored by sammccall on Jan 14 2021, 2:51 PM.

Details

Summary

And mark a couple to be retired afther the next release branch.

Diff Detail

Event Timeline

sammccall created this revision.Jan 14 2021, 2:51 PM
sammccall requested review of this revision.Jan 14 2021, 2:51 PM

the code looks good to me, but we need to be a bit careful on landing this -- as we have an internal client setting this flag.

clang-tools-extra/clangd/ClangdServer.h
139

our internal client explicitly set this to true, so we need a migration plan for this, otherwise this would break our build of internal client during the integration, a possible plan is

  1. set this flag to true by default in upstream, wait for the integration
  2. remove the explicit setting internally
  3. remove this flag (this patch) in upstream

Or just remove the flag internally, then land this patch in upstream (but internal release has to pick-up these two together)

hokein accepted this revision.Jan 20 2021, 2:30 AM
This revision is now accepted and ready to land.Jan 20 2021, 2:30 AM
sammccall added inline comments.Jan 20 2021, 2:31 AM
clang-tools-extra/clangd/ClangdServer.h
139

Discussed offline - there's no reason to block for out-of-tree clients here.

(We're removing support for a configuration - SuggestMissingIncludes = false - which is AFAIK unused anywhere. And we're removing the flag as well, but this is a trivial API change to adapt to)

ivanmurashko added inline comments.
clang-tools-extra/clangd/tool/ClangdMain.cpp
762

@sammccall The option is always true, do we need it as an option?

Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 14 2022, 12:38 AM
sammccall marked an inline comment as done.May 16 2022, 12:55 AM
sammccall added inline comments.
clang-tools-extra/clangd/tool/ClangdMain.cpp
762

It's false in tests, except when we're testing the index specifically.
On balance I think this is a good think because it allows us to reason about a simpler system when designing/debugging tests. In particular we don't have to worry about the AST-paths in tests "cheating" by looking at the index.

Seems sensible to make the struct default true and set it to false explicitly in optsForTest, though.