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

Fix manual targets sync for target explicitly specified #5458

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

rogerhu
Copy link
Contributor

@rogerhu rogerhu commented Oct 11, 2023

Checklist

  • I have filed an issue about this change and discussed potential changes with the maintainers.
  • I have received the approval from the maintainers to make this change.
  • This is not a stylistic, refactoring, or cleanup change.

This PR is a continuation of #4546. One issue is that for manual targets specified, they are also excluded without this change (see #4546 (comment)).

This fix will only work currently if the shard_sync: true. Otherwise the query will not be performed. I pushed a second commit to make this change explicit. Otherwise, two flags must be set for this part to work.

Issue number: #4546

Description of this change

When allow_manual_targets_sync: true is set, this change will allow manual targets to be part of the target query. Because expansion of build targets currently only occur when the sharding approach is enabled, this change would also switch on the shard_sync: true option to enable this query to occur. The alternative would be to create another option to expand the query, so I wanted to get feedback about it.

I've also modified unit tests to perform the check for both on/off, asserting the presence of the manual attr query.

@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 Oct 11, 2023
@rogerhu rogerhu changed the title Rogerh/issue 4546 4 Fix manual targets sync for target explicitly specified Oct 11, 2023
@mai93 mai93 removed their assignment Oct 16, 2023
@blorente blorente merged commit 8532fe6 into bazelbuild:master Oct 18, 2023
6 checks passed
@github-actions github-actions bot removed the awaiting-review Awaiting review from Bazel team on PRs label Oct 18, 2023
@rogerhu
Copy link
Contributor Author

rogerhu commented Nov 2, 2023

@rogerhu @tpasternak Can we have this documented somewhere next to https://ij.bazel.build/docs/project-views.html#derive_targets_from_directories ? I've sharing the issue for this PR but I think docs supposed to reflect such properties.

Yep! I have to file a ticket apparently since the Bazel IntelliJ docs are not open source. =)

https://bazelbuild.slack.com/archives/C025SBYFC4E/p1697741079375969

@rogerhu
Copy link
Contributor Author

rogerhu commented Nov 2, 2023

Created a ticket here: #5590

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.

4 participants