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

properly reject failed language service calls #760

Merged
merged 1 commit into from
Sep 8, 2020

Conversation

brettfo
Copy link
Member

@brettfo brettfo commented Sep 8, 2020

If a language service call fails, it can leave the VS Code UI forever in a Loading... state. An example of this is trying to invoke hover text for F# code. The command expectedly fails due to a NoSuitableKernelFoundException (because F# currently doesn't provide hover text), but that failure is never propagated to the UI.

The fix is to actually call reject() if the call failed.

This addresses the real underlying problem mentioned in #736, and #714 will add hover text for F#.

Without this change, the failure would bubble all the way to the top of the JS engine and manifest itself in the console.

The real change is the addition of the ensureErrorsAreRejected() function; the rest is just copy/paste.

@brettfo brettfo linked an issue Sep 8, 2020 that may be closed by this pull request
@brettfo brettfo merged commit 25c3351 into dotnet:main Sep 8, 2020
@brettfo brettfo deleted the failed-lang-svc branch September 8, 2020 22:01
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.

F# Hovertext not displayed, hangs on "Loading..." indefinitely.
2 participants