Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add bazel query flag to work around bug #414

Merged
merged 2 commits into from
Mar 24, 2021
Merged

Add bazel query flag to work around bug #414

merged 2 commits into from
Mar 24, 2021

Conversation

geoffromer
Copy link
Contributor

Due to a bug, --output=locations does not behave as specified in some versions of Bazel, with the result that the generated compile_commands.json contains BUILD files in place of all non-generated C++ source files. This is fixed in Bazel 4.0.0, but only behind the --incompatible_display_source_file_location flag.

@geoffromer geoffromer requested a review from chandlerc March 23, 2021 19:17
@geoffromer geoffromer requested a review from a team as a code owner March 23, 2021 19:17
@google-cla google-cla bot added the cla: yes PR meets CLA requirements according to bot. label Mar 23, 2021
Copy link
Contributor

@mmdriley mmdriley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one comment

@@ -71,6 +71,7 @@
"query",
"--keep_going",
"--output=location",
"--incompatible_display_source_file_location",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's leave a comment to warn our future selves about this sharp edge

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@geoffromer geoffromer merged commit cba22f7 into carbon-language:trunk Mar 24, 2021
@geoffromer geoffromer deleted the clangd2 branch March 24, 2021 19:14
chandlerc pushed a commit that referenced this pull request Jun 28, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
cla: yes PR meets CLA requirements according to bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants