Skip to content

Use new isTransient API to prevent duplicate integrated consoles #3854

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

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

andyleejordan
Copy link
Member

@andyleejordan andyleejordan commented Feb 28, 2022

This new API available today in VS Code 1.65.0 prevents Code from saving
and reloading the integrated console when the extension is reloaded.
This is necessary because the extension always spawns a new terminal to
host PowerShell Editor Services when it starts, and Code's newish
feature to save and restore terminals caused these to be duplicated.
When we update the VS Code engine, we can remove the cast to any.

Fixes #3360.

@ghost ghost added Area-Extension Terminal Issue-Bug A bug to squash. labels Feb 28, 2022
This new API available today in VS Code 1.65.0 prevents Code from saving
and reloading the integrated console when the extension is reloaded.
This is necessary because the extension always spawns a new terminal to
host PowerShell Editor Services when it starts, and Code's newish
feature to save and restore terminals caused these to be duplicated.
When we update the VS Code engine, we can remove the cast to `any`.
@andyleejordan andyleejordan force-pushed the andschwa/isTransient branch from 1b832e1 to fa8ff74 Compare March 3, 2022 22:52
@andyleejordan andyleejordan changed the title WIP: Test isTransient feature Use new isTransient API to prevent duplicate integrated consoles Mar 3, 2022
@andyleejordan andyleejordan marked this pull request as ready for review March 3, 2022 23:01
@andyleejordan
Copy link
Member Author

@SeeminglyScience I tested and the cast as any works as one would hope, and nothing is broken with older versions of VS Code (explicitly opened 1.59.0 and the previous behavior reproduced, so the guard is correctly working).

Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

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

LGTM!

@andyleejordan andyleejordan merged commit 1f924d1 into master Mar 4, 2022
@andyleejordan andyleejordan deleted the andschwa/isTransient branch March 4, 2022 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Extension should not duplicate integrated console terminals
2 participants