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

Language server middleware occasionally fails to publish diagnostics #9096

Closed
MikhailArkhipov opened this issue Dec 13, 2019 · 0 comments
Closed
Assignees
Labels
area-diagnostics Logging/Features to facilitate diagnosing user problems bug Issue identified by VS Code Team member as probable bug

Comments

@MikhailArkhipov
Copy link

LanguageClientMiddleware is implemented as a class and relies on this. However, in VSC client middleware is assumed to be function at least for handleDiagnostics i.e.

handleDiagnostics?: (this: void, uri: Uri, diagnostics: VDiagnostic[], next: HandleDiagnosticsSignature) => void;

and

        let middleware = this.clientOptions.middleware.handleDiagnostics;
        if (middleware) {
            middleware(uri, diagnostics, (uri, diagnostics) => this.setDiagnostics(uri, diagnostics));
        }

This causes diagnostics reports to fail b.c this is undefined.

@MikhailArkhipov MikhailArkhipov added bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team labels Dec 13, 2019
@MikhailArkhipov MikhailArkhipov self-assigned this Dec 13, 2019
@kimadeline kimadeline added area-diagnostics Logging/Features to facilitate diagnosing user problems needs PR labels Dec 16, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Dec 16, 2019
@kimadeline kimadeline added this to the 2019 December Sprint 1 milestone Dec 16, 2019
@ghost ghost removed the needs PR label Dec 16, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Dec 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-diagnostics Logging/Features to facilitate diagnosing user problems bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants