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

[AOSP-pick] Parameterize aspect at instantiation #7382

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

sellophane
Copy link
Collaborator

Cherry pick AOSP commit 2e116b56c18f3c50f832e759537321ed0ba6fb34.

This is to unify the test and production flows and make manual testing
from the command line tolerable.

It should also make the aspect configuration visible in CitC snapshots
and aspect builds easily reproducible in users' workspaces.

Bug: 327638725
Test: BazelDependencyBuilderTest
Change-Id: I4cf4b408097cecc7d324310d98c18ce36900468e

AOSP: 2e116b56c18f3c50f832e759537321ed0ba6fb34

@sellophane sellophane requested a review from mai93 as a code owner February 28, 2025 17:39
@sellophane sellophane requested a review from LeFrosch February 28, 2025 17:39
@github-actions github-actions bot added product: CLion CLion plugin product: IntelliJ IntelliJ plugin product: GoLand GoLand plugin awaiting-review Awaiting review from Bazel team on PRs labels Feb 28, 2025
Comment on lines -412 to -421
for inc in include.split(","):
# This is not a valid label, but can be passed to aspect when `directories: .` is set in the projectview
if (inc == "//"):
result = True
break

inc = Label(inc)
if _get_repo_name(inc) == repo and _package_prefix_match(package, inc.package):
result = True
break
Copy link
Collaborator

Choose a reason for hiding this comment

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

I personally prefer this implementation. But of course I'm biased here. I think we should either keep the original implementation or use the AOSP implementation.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the AOSP implementation is better, because it doesn't try to use a comma-delimited string as a makeshift collection.

Comment on lines -167 to -169
projectDefinition.projectIncludes().stream()
.map(path -> "//" + path)
.collect(joining(","));
Copy link
Collaborator

Choose a reason for hiding this comment

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

@odisseus you are right, they are dropping the comma separated collection. In this case I would suggest to drop all my changes and use the AOSP implementation.

@sellophane sellophane force-pushed the AOSP/2e116b56c18f3c50f832e759537321ed0ba6fb34 branch from 0fba2f6 to 58a20fe Compare March 4, 2025 14:42
This is to unify the test and production flows and make manual testing
from the command line tolerable.

It should also make the aspect configuration visible in CitC snapshots
and aspect builds easily reproducible in users' workspaces.

Bug: 327638725
Test: BazelDependencyBuilderTest
Change-Id: I4cf4b408097cecc7d324310d98c18ce36900468e

AOSP: 2e116b56c18f3c50f832e759537321ed0ba6fb34
@sellophane sellophane force-pushed the AOSP/2e116b56c18f3c50f832e759537321ed0ba6fb34 branch from 58a20fe to 64c57c7 Compare March 4, 2025 14:43
@sellophane sellophane requested a review from LeFrosch March 4, 2025 14:43
@LeFrosch LeFrosch merged commit 2efb9f9 into master Mar 4, 2025
7 checks passed
@github-actions github-actions bot removed the awaiting-review Awaiting review from Bazel team on PRs label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: CLion CLion plugin product: GoLand GoLand plugin product: IntelliJ IntelliJ plugin
Projects
Development

Successfully merging this pull request may close these issues.

5 participants