Disable parse_headers when generating commands#274
Open
keith wants to merge 1 commit intohedronvision:mainfrom
Open
Disable parse_headers when generating commands#274keith wants to merge 1 commit intohedronvision:mainfrom
keith wants to merge 1 commit intohedronvision:mainfrom
Conversation
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.
Ahajha
added a commit
to modular/bazel-compile-commands-extractor
that referenced
this pull request
Mar 11, 2026
Ahajha
added a commit
to modular/bazel-compile-commands-extractor
that referenced
this pull request
Mar 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since the parse_headers action has a command line with no source files
and only headers it results in an exception like:
This header knowledge probably isn't necessary anyways since that can
come from other sources.