Open LittleCuteBug opened 5 months ago
Hey @LittleCuteBug! Thanks for giving the tool a whirl. This is...a very strange one. Those are internal bazel tools failing to have been instantiated properly. Do things work properly if you remove the --output_base bazel-cache
, add it to your bazelrc, or also pass it to our subcommands by appending -- --output_base bazel-cache
(see the flag configuration section of the readme for more.)? I'm guessing the problem is that the tool is getting a different output base at runtime from compile time.
Hi @cpsauer, I have also tried the .bazelrc and -- --output_base bazel-cache
and still have the same error.
Without the --output_base bazel-cache
, the bazel run @hedron_compile_commands//:refresh_all
works fine for me.
I'm guessing the problem is that the tool is getting a different output base at runtime from compile time.
Yes, I think that is the problem too.
Hi @cpsauer, I think I found the reason, it's because I set the output_base inside the workspace, so the hedron_compile_commands tried to check in that directory also. Is there any way to exclude that directory?
Oh! interesting. Sounds like all works fine if the output_base is outside the workspace? If so, this really seems like a Bazel bug...and worth reporting to them. To help scope:
yes, I have managed to work with the combination of startup --output_base=bazel-cache
in the .bazelrc and bazel-cache
in the .bazelignore file.
A small interesting issue is the query command used in the hedron_compile_commands only takes effect of the .bazelrc when the hedron_compile_commands repo is imported by git_repository
rule or local_repository
rule. if I included it with http_archive, the .bazelrc config seems not to take effect.
when run with
bazel --output_base bazel-cache run @hedron_compile_commands//:refresh_all
I got the following error, can anyone provide help?