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

c2p bypassConversion static method create unecessary promises #357

Closed
rubenfiszel opened this issue May 22, 2022 · 0 comments · Fixed by #359
Closed

c2p bypassConversion static method create unecessary promises #357

rubenfiszel opened this issue May 22, 2022 · 0 comments · Fixed by #359

Comments

@rubenfiszel
Copy link

I spent a lot of time on the debugger for #356 and I got to the bottom of it.

bypassConversion:

static bypassConversion = (result: any, token?: vscode.CancellationToken) => token != null ? Promise.resolve(result || undefined) : (result || undefined);

in conjunction with c2p.asFormattingOptions at:

asFormattingOptions(options: monaco.languages.FormattingOptions): FormattingOptions {

results in: https://github.com/microsoft/vscode-languageserver-node/blob/f97bb73dbfb920af4bc8c13ecdcdc16359cdeda6/client/src/common/formatting.ts#L77 returning a Promise instead of the value itself.

The promise does not get serialized which is the cause for #356

rubenfiszel added a commit to rubenfiszel/monaco-languageclient that referenced this issue May 22, 2022
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 a pull request may close this issue.

1 participant