Skip to content

Conversation

@keith
Copy link

@keith keith commented Dec 12, 2025

Since the parse_headers action has a command line with no source files
and only headers it results in an exception like:

  File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/480ee760ab026be301955dc1adc19e40/execroot/_main/bazel-out/k8-dbg/bin/bazel/internal/internal_refresh_compile_commands_use_script_instead.runfiles/_main/bazel/internal/internal_refresh_compile_commands_use_script_instead.py", line 1087, in _get_cpp_command_for_files
    source_files, header_files = _get_files(compile_action, bazel_binary)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/480ee760ab026be301955dc1adc19e40/execroot/_main/bazel-out/k8-dbg/bin/bazel/internal/internal_refresh_compile_commands_use_script_instead.runfiles/_main/bazel/internal/internal_refresh_compile_commands_use_script_instead.py", line 590, in _get_files
    assert source_file_candidates, f"No source files found in compile args: {compile_action.arguments}.\nPlease file an issue with this information!"
           ^^^^^^^^^^^^^^^^^^^^^^

This header knowledge probably isn't necessary anyways since that can
come from other sources.

Since the parse_headers action has a command line with no source files
and only headers it results in an exception like:

```
  File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/480ee760ab026be301955dc1adc19e40/execroot/_main/bazel-out/k8-dbg/bin/bazel/internal/internal_refresh_compile_commands_use_script_instead.runfiles/_main/bazel/internal/internal_refresh_compile_commands_use_script_instead.py", line 1087, in _get_cpp_command_for_files
    source_files, header_files = _get_files(compile_action, bazel_binary)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/480ee760ab026be301955dc1adc19e40/execroot/_main/bazel-out/k8-dbg/bin/bazel/internal/internal_refresh_compile_commands_use_script_instead.runfiles/_main/bazel/internal/internal_refresh_compile_commands_use_script_instead.py", line 590, in _get_files
    assert source_file_candidates, f"No source files found in compile args: {compile_action.arguments}.\nPlease file an issue with this information!"
           ^^^^^^^^^^^^^^^^^^^^^^
```

This header knowledge probably isn't necessary anyways since that can
come from other sources.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant