Title: Diagnostic list flickers annoyingly when opening a document · Issue #512 · microsoft/python-language-server · GitHub
Open Graph Title: Diagnostic list flickers annoyingly when opening a document · Issue #512 · microsoft/python-language-server
X Title: Diagnostic list flickers annoyingly when opening a document · Issue #512 · microsoft/python-language-server
Description: In VSCode, if you display all diagnostics for your project (i.e. set the "python.analysis.openFilesOnly" to "false"), you can view the list in the "Problems" panel. If you open a Python file that contains a reported diagnostic the analys...
Open Graph Description: In VSCode, if you display all diagnostics for your project (i.e. set the "python.analysis.openFilesOnly" to "false"), you can view the list in the "Problems" panel. If you open a Python file that c...
X Description: In VSCode, if you display all diagnostics for your project (i.e. set the "python.analysis.openFilesOnly" to "false"), you can view the list in the "Problems" panel. If...
Opengraph URL: https://github.com/microsoft/python-language-server/issues/512
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Diagnostic list flickers annoyingly when opening a document","articleBody":"In VSCode, if you display all diagnostics for your project (i.e. set the \"python.analysis.openFilesOnly\" to \"false\"), you can view the list in the \"Problems\" panel. If you open a Python file that contains a reported diagnostic the analysis diagnostics for that file briefly disappear and then reappear. This is not only aesthetically unpleasing, it's also disorienting if you just clicked on one of these items to open the file and view an error in the editor.\r\n\r\nThe problem appears to be that the PLS is reporting diagnostics in two phases: parsing and analysis. When a file is closed, the server sees version -1 of the file, but when it's opened, the server sees version 1. This causes the server to re-parse and re-analyze the file from scratch. (As an aside, this seems wasteful given that the file hasn't changed. Maybe it could be skipped altogether?) When the parse is complete, the server reports the incomplete diagnostics, which don't contain the analysis drags. Then shortly later it reports the full diagnostics. In the meantime, VSCode has updated the diagnostic list in the \"Problems\" panel.\r\n\r\nI don't fully understand the original reason behind updating the parse and analysis errors independently, so I'm not sure of the correct fix. My attempt at a fix is to comment out the following three lines from EditorFile.UpdateParseDiagnostics:\r\n```\r\n// if (diags != null) {\r\n// PublishDiagnostics(diags);\r\n// }\r\n```\r\nThis skips the reporting of the partial diagnostics and waits for completion of the analysis. With this change, the annoying flicker, and I haven't noticed any bad side effects.","author":{"url":"https://github.com/erictraut","@type":"Person","name":"erictraut"},"datePublished":"2018-12-26T17:57:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/512/python-language-server/issues/512"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:65cca627-8fcf-f8e4-7cb8-bf7fdb9137b4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A84E:322E35:89B0F1B:C202644:6A50D9BE |
| html-safe-nonce | 8f95e6b0f160c7f825cead9d37bf3ade748b1511853090eeaf394b1f70784606 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODRFOjMyMkUzNTo4OUIwRjFCOkMyMDI2NDQ6NkE1MEQ5QkUiLCJ2aXNpdG9yX2lkIjoiMjgwNTM3NjE3OTM1MTM5MTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4b7a2c977999ece3da0c48cf2b5a27b151d688f0a4b7dcb0e044252ed42b4ab6 |
| hovercard-subject-tag | issue:394213921 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/python-language-server/512/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2db93b24b33b342d41969ad4e525a7cd5dd9b1c9ef5610b6085f6be469275776/microsoft/python-language-server/issues/512 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2db93b24b33b342d41969ad4e525a7cd5dd9b1c9ef5610b6085f6be469275776/microsoft/python-language-server/issues/512 |
| og:image:alt | In VSCode, if you display all diagnostics for your project (i.e. set the "python.analysis.openFilesOnly" to "false"), you can view the list in the "Problems" panel. If you open a Python file that c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | erictraut |
| hostname | github.com |
| expected-hostname | github.com |
| None | 72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/python-language-server git https://github.com/microsoft/python-language-server.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 145901977 |
| octolytics-dimension-repository_nwo | microsoft/python-language-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 145901977 |
| octolytics-dimension-repository_network_root_nwo | microsoft/python-language-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 73ad5c4eaffed7bb3637024653eabdbca84a855e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width