bazel_clang_tidy
bazel_clang_tidy copied to clipboard
Doesn't work with --experimental_cc_implementation_deps
It seems that the implementation dependencies are not included in the compilation context, so clang-tidy doesn't see the headers.
I tried to debug this problem, but I actually have no idea where bazel puts the implementation dependencies since they are not in the sandbox directory.
FYI ran into the same issue, one suggestion I got to my question on the bazel slack channel was to walk the implementation_deps manually, which seems to work. It was by design that the compilation context only returns public properties.
Unsure whether manually combining all the depset propererties of the target's compilation context, as well as the implementation_dep's compilation contexts, is a general solution, but it seems to work in our case.
- I overcome this by adding implementation compilation_contexts https://github.com/zpzjzj/bazel_clang_tidy/commit/867182a4683a4357b940498ef4d544738d34b5cc
- Bazel 6.0.0 may fix this, I did not tested yet : https://github.com/bazelbuild/bazel/issues/14731