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

AttributeError: 'types.SimpleNamespace' object has no attribute 'value'

Open rkjaran opened this issue 4 months ago • 0 comments

Trying to generate compile_commands.json using commit 4f28899228fb3ad0126897876f147ca15026151e on Bazel 8 and this is what I get, no matter if I use refresh_all or refresh_compile_commands with a specific target.

  File "/home/rkjaran/.cache/bazel/_bazel_rkjaran/0b1b762b5df603f270b0789f508a8f34/execroot/_main/bazel-out/k8-dbg/bin/refresh_compile_commands.runfiles/_main/refresh_compile_commands.py", line 1113, in _get_cpp_command_for_files
    compile_action.environmentVariables = {pair.key: pair.value for pair in getattr(compile_action, 'environmentVariables', [])}
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rkjaran/.cache/bazel/_bazel_rkjaran/0b1b762b5df603f270b0789f508a8f34/execroot/_main/bazel-out/k8-dbg/bin/refresh_compile_commands.runfiles/_main/refresh_compile_commands.py", line 1113, in <dictcomp>
    compile_action.environmentVariables = {pair.key: pair.value for pair in getattr(compile_action, 'environmentVariables', [])}
                                                     ^^^^^^^^^^
AttributeError: 'types.SimpleNamespace' object has no attribute 'value'

rkjaran avatar Jun 19 '25 11:06 rkjaran