Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

CLion support for cc_library implementation deps #6919

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

LeFrosch
Copy link
Collaborator

Discussion thread for this change

Issue number: #5149

Description of this change

Rebased PR #5220 and added an integration test for implementation_deps.

@LeFrosch LeFrosch changed the title Implementation deps CLion support for cc_library implementation deps Oct 21, 2024
@LeFrosch LeFrosch force-pushed the implementation_deps branch from 7ffd69e to ef30d1a Compare October 21, 2024 09:04
@LeFrosch LeFrosch marked this pull request as ready for review October 21, 2024 09:07
@github-actions github-actions bot added product: CLion CLion plugin awaiting-review Awaiting review from Bazel team on PRs labels Oct 21, 2024
quote_includes = compilation_context.quote_includes.to_list()
system_includes = compilation_context.system_includes.to_list()

if hasattr(ctx.rule.attr, "implementation_deps"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

can't this information be obtained from CcInfo provider?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think there is a way since bazel treats impl deps context different from the main context. CcInfo only exposes the main context as far as I can tell.

https://github.com/bazelbuild/bazel/blob/b85db78de3b25cb7f5c9cb0c7afe388f75e040e3/src/main/starlark/builtins_bzl/common/cc/cc_compilation_helper.bzl#L449

Copy link
Collaborator

Choose a reason for hiding this comment

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

this way it looks nice

@LeFrosch LeFrosch force-pushed the implementation_deps branch from ef30d1a to 6db1fa5 Compare October 22, 2024 09:30
Copy link
Collaborator

@ujohnny ujohnny left a comment

Choose a reason for hiding this comment

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

lgtm

# Conflicts:
#	.bazelrc
#	clwb/tests/integrationtests/com/google/idea/blaze/clwb/VirtualIncludesTest.java
@LeFrosch LeFrosch force-pushed the implementation_deps branch from 6db1fa5 to b476b27 Compare October 25, 2024 06:51
@LeFrosch LeFrosch merged commit 1f14091 into bazelbuild:master Oct 25, 2024
6 checks passed
@LeFrosch LeFrosch deleted the implementation_deps branch October 25, 2024 07:52
@github-actions github-actions bot removed the awaiting-review Awaiting review from Bazel team on PRs label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: CLion CLion plugin
Projects
Development

Successfully merging this pull request may close these issues.

2 participants