-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Conversation
@@ -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. |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
@@ -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); |
There was a problem hiding this comment.
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.
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.