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

Use git info only when Expand to Working Set is enabled #6944

Conversation

dkashyn-sfdc
Copy link
Contributor

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.

Please note that the maintainers will not be reviewing this change until all checkboxes are ticked. See
the Contributions section in the README for more
details.

Discussion thread for this change

Issue number: (#6943)

Description of this change

@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 30, 2024
vcsState.flatMap(s -> s.workspaceSnapshotPath).map(Object::toString).orElse("<none>")));

Optional<VcsState> vcsState = Optional.empty();
if (BlazeUserSettings.getInstance().getExpandSyncToWorkingSet()) {
Copy link
Contributor Author

@dkashyn-sfdc dkashyn-sfdc Oct 30, 2024

Choose a reason for hiding this comment

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

Probably other option should be added for QS yet even QS-relevant delta calculation will be taxing in some cases.

Also Sync to Working Set is enabled by default, iirc. So default QS behavior won't change.

@@ -125,7 +126,7 @@ private SyncProjectState getProjectState(BlazeContext context, BlazeSyncParams p
createBazelInfoFuture(context, syncFlags, params.syncMode());

ListenableFuture<WorkingSet> workingSetFuture;
if (params.addWorkingSet() || params.syncMode() == SyncMode.FULL) {
if (params.addWorkingSet() || (BlazeUserSettings.getInstance().getExpandSyncToWorkingSet() && params.syncMode() == SyncMode.FULL)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't know when this one is used but it is bad to ignore the setting anyway so we need to double check here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, params.addWorkingSet already checks for that, but I'll merge

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want to avoid unconditional params.syncMode() == SyncMode.FULL this is quite recent change from September

@dkashyn-sfdc dkashyn-sfdc force-pushed the respect-workset-settings-query-sync-and-beyond branch from 56b104c to 087553f Compare October 30, 2024 14:49
@@ -125,7 +126,7 @@ private SyncProjectState getProjectState(BlazeContext context, BlazeSyncParams p
createBazelInfoFuture(context, syncFlags, params.syncMode());

ListenableFuture<WorkingSet> workingSetFuture;
if (params.addWorkingSet() || params.syncMode() == SyncMode.FULL) {
if (params.addWorkingSet() || (BlazeUserSettings.getInstance().getExpandSyncToWorkingSet() && params.syncMode() == SyncMode.FULL)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, params.addWorkingSet already checks for that, but I'll merge

@tpasternak tpasternak merged commit a041f5e into bazelbuild:master Oct 30, 2024
6 checks passed
@github-actions github-actions bot removed the awaiting-review Awaiting review from Bazel team on PRs label Oct 30, 2024
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