bazel-compile-commands-extractor icon indicating copy to clipboard operation
bazel-compile-commands-extractor copied to clipboard

External execroot cache invalidated when generating compile commands

Open kgreenek opened this issue 1 year ago • 6 comments

edit: See below comments where I dug in a bit deeper and found a potentially broader issue.

Hi! I love this project and have been using it successfully for many years.

Recently I upgrade protobuf and now I am running into the following issue.

Whenever there is a protobuf c++ target, hedron_compile_commands cannot build the compile_commands.json successfully. It seems to be using the wrong version of probotuf somehow. This is weird because the bazel build succeeds. It's only the hedron refresh_compile_commands target that fails.

I created a minimal example repo with instructions to reproduce the issue here: https://github.com/kgreenek/hedron_pb_bug_repro

I verified that when running the example binary, the protobuf version found at compile time is the expected newer version. So I believe somehow hedron is finding some older headers.

I tried removing all protobuf headers from my system to see if those were being found somehow. However, hedron still found the wrong version of protobuf somehow and I saw the same errors.

kgreenek avatar Jun 22 '24 23:06 kgreenek