Skip to content

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

@rkjaran

Description

@rkjaran

Trying to generate compile_commands.json using commit 4f28899 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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions