Included in logs, --version, remote index queries, and LSP serverInfo.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
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 |
(fyi: this broke mac builds. i fixed that in b56e5f8a10c1ec4fd3750bdd269fbad778820326)
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.
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 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:
- 86c5afa6e601c4a80d46a7a8b892d5c49bcec078 is the missing include from your log
- 0c53f602d5a9d7207abb13e463f68e9d092f47a7 is a few more cases i found
- then 26e1553a107f52667be879e99739a4153f8799d8 just adds the include dirs at the top level (where it's not needed!) since cmake seems to inherit this property to subdirectories
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...
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).