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

Simplify updating the primary workspace without passing in a version #72688

Merged
merged 4 commits into from
Mar 23, 2024

Conversation

CyrusNajmabadi
Copy link
Member

the host already guarantees we only move the primary-solution forward in a monotonic fashion. And we only send the next event when teh prior completes. So all this complexity around workpsace versions during syncing is entirely unnecessary.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner March 22, 2024 22:25
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 22, 2024
@@ -60,9 +60,6 @@ internal sealed class SolutionChecksumUpdater
listener,
shutdownToken);

// Use an equality comparer here as we will commonly get lots of change notifications that will all be
// associated with the same cancellation token controlling that batch of work. No need to enqueue the same
// token a huge number of times when we only need the single value of it when doing the work.
Copy link
Member Author

Choose a reason for hiding this comment

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

comment was stale. no equality comaprer was passed at all. this was before we had the arg-less ABWQ.

@@ -142,17 +139,15 @@ private void OnWorkspaceChanged(object? sender, WorkspaceChangeEventArgs e)

private async ValueTask SynchronizePrimaryWorkspaceAsync(CancellationToken cancellationToken)
Copy link
Member Author

Choose a reason for hiding this comment

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

this is called, serially, by the ABWQ. So we never have to be concerned about the workspace version soemhow going downwards.

@CyrusNajmabadi CyrusNajmabadi merged commit 2f91366 into dotnet:main Mar 23, 2024
25 of 27 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the simplifyVersion branch March 23, 2024 02:47
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Mar 23, 2024
@@ -90,13 +83,12 @@ public AssetProvider CreateAssetProvider(Checksum solutionChecksum, SolutionAsse
Func<Solution, ValueTask<T>> implementation,
CancellationToken cancellationToken)
{
return RunWithSolutionAsync(assetProvider, solutionChecksum, workspaceVersion: -1, updatePrimaryBranch: false, implementation, cancellationToken);
Copy link
Member

Choose a reason for hiding this comment

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

📝 This instance of workspaceVersion was never used because updatePrimaryBranch is set to false and accesses of the version are gated by it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants