Skip to content

Conversation

@daviwil
Copy link
Contributor

@daviwil daviwil commented Nov 17, 2015

This pull request includes final protocol changes and bug fixes before the 0.1.0 release.

This change updates the language server protocol to respond to some last
minute changes in VS Code's JSON RPC messages.
This change introduces a "fix" for the issue where the language service
host process will spin at high CPU if the client's input stream terminates
unexpectedly.  This issue is caused by incorrectly handling the result of
Stream.ReadAsync which states that a result of 0 means that the stream has
terminated.  Instead of returning true and continuing the read loop, I now
throw an EndOfStreamException which causes the app to terminate with an
unhandled exception.

A future fix will be implemented to provide a more graceful shutdown path.
This change renames the PowerShellSession class to PowerShellContext to
avoid confusion with the existing concept of a PSSession in PowerShell.
This change catches the GetValueInvocationException that can be raised in
VariableDetails.GetChildren() when it is called on a thread other than the
debugger pipeline thread.  In the future, all requests for children of a
variable should be done on this thread.  For now we just catch the
exception so that the debug adapter does not crash.
@msftclas
Copy link

Hi @daviwil, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (David Wilson (WSSC)). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

daviwil added a commit that referenced this pull request Nov 17, 2015
@daviwil daviwil merged commit 27369cc into master Nov 17, 2015
@daviwil daviwil deleted the daviwil/protocol-change branch November 17, 2015 23:15
TylerLeonhardt pushed a commit to TylerLeonhardt/PowerShellEditorServices that referenced this pull request Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants