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

Delete task extension used only by the interactive window. #76450

Merged
merged 14 commits into from
Dec 17, 2024

Conversation

CyrusNajmabadi
Copy link
Member

Followup to #76448

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner December 16, 2024 21:44
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 16, 2024
@CyrusNajmabadi CyrusNajmabadi requested a review from tmat December 16, 2024 21:44
@@ -41,36 +41,35 @@ internal ResetInteractive(EditorOptionsService editorOptionsService, Func<string
_createImport = createImport;
}

internal Task ExecuteAsync(IInteractiveWindow interactiveWindow, string title)
internal async Task ExecuteAsync(IInteractiveWindow interactiveWindow, string title)
Copy link
Member Author

Choose a reason for hiding this comment

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

caller of this was going an await anyways, so there was no reason i could figure out for this to be written as task returning, with task continuations, instead of just normal async/await.

// Now, we're going to do a bunch of async operations. So create a wait
// indicator so the user knows something is happening, and also so they cancel.
var uiThreadOperationExecutor = GetUIThreadOperationExecutor();
using var context = uiThreadOperationExecutor.BeginExecute(title, EditorFeaturesWpfResources.Building_Project, allowCancellation: true, showProgress: false);
Copy link
Member Author

Choose a reason for hiding this comment

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

a normal using now, so we don't need an explicit dispose.

projectNamespaces,
projectDirectory,
platform,
context).ConfigureAwait(true);
Copy link
Member Author

Choose a reason for hiding this comment

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

intentionally CA(True) since hte original code did a ContinueWith with FromCurrentSynchronizationContext.

finally
{
// Once we're done resetting focus the REPL window.
ExecutionCompleted?.Invoke(this, new EventArgs());
Copy link
Member Author

Choose a reason for hiding this comment

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

in a finally, so we always do this regardless of cancellation (Teh semantics of SafeContinueWith).

@CyrusNajmabadi
Copy link
Member Author

@tmat ptal

@CyrusNajmabadi
Copy link
Member Author

@dotnet/roslyn-ide @jasonmalinowski ptal

@CyrusNajmabadi CyrusNajmabadi merged commit 31e5802 into dotnet:main Dec 17, 2024
25 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the replExtension branch December 17, 2024 06:16
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Dec 17, 2024
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 VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants