-
Notifications
You must be signed in to change notification settings - Fork 676
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
Error List doesn't refresh after creating a new project #7534
Comments
Per LSP spec, diagnostics notifications are sent from the server to the client to signal results of validation runs. Diagnostics are “owned” by the server so it is the server’s responsibility to clear them if necessary. The following rule is used for VS Code servers that generate diagnostics:
When a file changes it is the server’s responsibility to re-compute diagnostics and push them to the client. If the computed set is empty it has to push the empty array to clear former diagnostics. Newly pushed diagnostics always replace previously pushed diagnostics. There is no merging that happens on the client side. Right now pylance server seems to do its job, now investigating if the client overwrites the diagnostics everytime it receives new ones. |
By observing the VS LSP file logger live telemetry, on solution/project close, Because of the sequence of the messages, and the fact that pylance only sends empty diagnostics on file close, pylance is not able to find files that belong to the workspace after This doesn't repro in the single root workspace scenario in vscode because vscode just disposes the old workspace and re-creates a new one on workspace open. This repros both in VS and the multi-root workspace scenario in vscode. To repro in vscode:
|
This should be fixed once Pylance ships the fix in stable. |
Environment
Steps to Reproduce
1.Create a python project
2.Type some problematic code in default file
3.File->New->Project
4.Check the Error List
Expected behavior
Error List should not display any error and warnings
Actual behavior
Error List doesn't refresh and still exist previous project's error and warnings
Additional context and screenshots
The text was updated successfully, but these errors were encountered: