Repository navigation
Fix debugging output location - #1162
TylerLeonhardt merged 7 commits into
Conversation
|
Big thanks for Dongbo Wang (@daxian-dbw) for helping me out! |
|
I'd recommend manually testing as many scenarios as you can with this one. Aborting PSRL without actually stopping it in the host could lead to a race condition where PSRL starts again before this thread actually acquires a runspace handle |
Patrick Meinecke (@SeeminglyScience) calling |
Unfortunately yeah :/ Here's the relevant bits in the host. Those methods are called in the |
Can we just lock it out? I know that means needing to acquire another lock for every prompt, but that's the cost of parallelism. All we need to know is where we should yield the lock. I assume that's after the |
It's not impossible, but with how it's set up it would be challenging. You'd have better luck moving the |
|
That last commit gets rid of:
I'm not sure where my prompt goes though... |
|
If both WriteOutput and Starting the REPL relied on having lock access to the runspace, could that work, Patrick Meinecke (@SeeminglyScience)? |
|
Just add a new internal property to Change it to: if (executionOptions.WriteInputToHost)
{
this.WriteOutput(
executionOptions.CommandText ?? psCommand.Commands[0].CommandText,
true);
} |
|
Ok I think I'm crazy... but we don't need the |
Yessir that's right |
|
Ok, I think this is ready for a proper review Patrick Meinecke (@SeeminglyScience) |
Patrick Meinecke (SeeminglyScience)
left a comment
There was a problem hiding this comment.
LGTM! with one nit
This fixes a lot of the prompt/output issues that we've been seeing.
fixes PowerShell/vscode-powershell#2372
fixes PowerShell/vscode-powershell#2407
fixes PowerShell/vscode-powershell#2408
this.WriteOutputwhen insteadExecuteCommandAsynccould just do itWriteOutputin the finally block now only runs in the legacy readline experienceThere's still a weird thing happening with prompts on F5... but that existed before this change so I'll try to address that in another PR.