This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Log feature configuration (linux+asan+grpc) of the clangd build
ClosedPublic

Authored by sammccall on Apr 15 2021, 5:38 AM.

Details

Summary

Included in logs, --version, remote index queries, and LSP serverInfo.

Diff Detail

Event Timeline

sammccall created this revision.Apr 15 2021, 5:38 AM
sammccall requested review of this revision.Apr 15 2021, 5:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2021, 5:38 AM
kadircet accepted this revision.Apr 16 2021, 2:17 AM

thanks, lgtm!

clang-tools-extra/clangd/Features.cpp
20

nit: drop parens ?

clang-tools-extra/clangd/Features.h
15

should we also put a IWYU pragma in Features.inc.in such as // IWYU pragma: private, include "Features.h" ? (clangd has special handling for .inc headers, but other tools might not have a code-base-wide view).

clang-tools-extra/clangd/tool/ClangdMain.cpp
681–682

please fix

This revision is now accepted and ready to land.Apr 16 2021, 2:17 AM
This revision was landed with ongoing or failed builds.Jun 30 2021, 8:49 AM
This revision was automatically updated to reflect the committed changes.
sammccall marked 3 inline comments as done.
thakis added a subscriber: thakis.Jun 30 2021, 9:54 AM

(fyi: this broke mac builds. i fixed that in b56e5f8a10c1ec4fd3750bdd269fbad778820326)

Doh, thank you Nico!

thakis added a comment.Jul 1 2021, 7:38 AM

Hm, my fix doesn't work either :/ https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8842935257512920928/+/u/package_clang/stdout?format=raw

-c /opt/s/w/ir/cache/builder/src/third_party/llvm/clang-tools-extra/clangd/xpc/XPCTransport.cpp
 In file included from /opt/s/w/ir/cache/builder/src/third_party/llvm/clang-tools-extra/clangd/xpc/XPCTransport.cpp:10:
 In file included from /opt/s/w/ir/cache/builder/src/third_party/llvm/clang-tools-extra/clangd/xpc/../Transport.h:21:
 /opt/s/w/ir/cache/builder/src/third_party/llvm/clang-tools-extra/clangd/xpc/../Features.h:14:10: fatal error: 'Features.inc' file not found
 #include "Features.inc"
          ^~~~~~~~~~~~~~
 1 error generated.

I guess now clangd/xpc needs an explicit dep on that .inc generating rule.

thakis added a comment.Jul 1 2021, 7:52 AM

Tried again in 2f79acb7b701c41494abff588b5f03a74ea2e11d. If someone wants to figure out how to make xpc see Features.inc in the cmake build, that'd work too.

I guess now clangd/xpc needs an explicit dep on that .inc generating rule.

I think it's rather missing -I for the generated clangd directory.
(The targets in clangd/xpc depend on clangDaemon which requires that generated header - not wonderfully explicit but also seems to be the way this is usually done at least in CMake)

Tried again in 2f79acb7b701c41494abff588b5f03a74ea2e11d. If someone wants to figure out how to make xpc see Features.inc in the cmake build, that'd work too.

Sorry, there was a near-identical break in index/remote/ and I didn't spot the xpc variant.
The idea is that all files under clang-tools-extra/clangd/ should have clangd/ on the include path (both normal and generated files).

Landed a few patches trying to improve this:

Not sure if these changes are things the gn bot is usually able to sync automatically, but at least CMake should be good and less fragile now, and check-clangd is still passing on the gn bots. I think 2f79acb7b701c41494abff588b5f03a74ea2e11d is now unneccesary (at least for cmake) and may try to revert it, but probably rather on monday than break more things today...