Title: Language server caching over-disposes LS instances, breaks on interpreter change · Issue #11317 · microsoft/vscode-python · GitHub
Open Graph Title: Language server caching over-disposes LS instances, breaks on interpreter change · Issue #11317 · microsoft/vscode-python
X Title: Language server caching over-disposes LS instances, breaks on interpreter change · Issue #11317 · microsoft/vscode-python
Description: #8815 introduced LS caching and ref counting, such that the interactive window can reference the same language server as the regular code and keep it around until it's no longer needed. The keys are resource scoped, which are good for en...
Open Graph Description: #8815 introduced LS caching and ref counting, such that the interactive window can reference the same language server as the regular code and keep it around until it's no longer needed. The keys ar...
X Description: #8815 introduced LS caching and ref counting, such that the interactive window can reference the same language server as the regular code and keep it around until it's no longer needed. The key...
Opengraph URL: https://github.com/microsoft/vscode-python/issues/11317
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Language server caching over-disposes LS instances, breaks on interpreter change","articleBody":"#8815 introduced LS caching and ref counting, such that the interactive window can reference the same language server as the regular code and keep it around until it's no longer needed. The keys are resource scoped, which are good for ensuring things are shared and the minimum number of LSs are spawned.\r\n\r\nUnfortunately, the `activeServer` and `resource` properties are essentially \"globals\" to the extension as a whole. The current code kills LSs as the user moves around different files to save resources, however this breaks multi-root workspaces which rely on being able to navigate around and still get code completions. (e.g., I open two files, one in each workspace, and switch between them)\r\n\r\nAdditionally, I believe the current code over-disposes, leading to a scenario where on the first active LS change, the next spawned server cannot be killed and isn't configured correctly, leading both to https://github.com/microsoft/vscode-python/issues/5132#issuecomment-603571156 and a related bug where the next-spawned server's interpreter doesn't change.\r\n\r\nThe solution here is to eliminate `activeServer` and `resource` and make LSs fully resource-scoped (only accessible by key). Once a LS is no longer referenced (no handles from the interactive window, and its workspace no longer exists), the LS can be thrown away.","author":{"url":"https://github.com/jakebailey","@type":"Person","name":"jakebailey"},"datePublished":"2020-04-22T00:00:04Z","url":"https://github.com/microsoft/vscode-python/issues/11317"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:1234e641-12e4-f86f-0e9b-0c53bf3fdf78 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A894:1DB568:831A61:B0F743:6AFE5A3C |
| html-safe-nonce | a9a7483691945b5d5a395fc6640f7438d1f7a2f9a2dd77f9640b115f65b035ab |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODk0OjFEQjU2ODo4MzFBNjE6QjBGNzQzOjZBRkU1QTNDIiwidmlzaXRvcl9pZCI6IjY2NzU2NDI1NjU4ODQwMDkwMjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b264c5e9dd17865140d57c5905cde77a40b32d6356fec67f11e2676b4860b9d4 |
| hovercard-subject-tag | issue:604357532 |
| 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/vscode-python/11317/issue_layout |
| twitter:image | https://opengraph.githubassets.com/62aed125c4f14e7e58fffa076510ae5bfa3b3bb3e885fefabcb19fc052ffda86/microsoft/vscode-python/issues/11317 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/62aed125c4f14e7e58fffa076510ae5bfa3b3bb3e885fefabcb19fc052ffda86/microsoft/vscode-python/issues/11317 |
| og:image:alt | #8815 introduced LS caching and ref counting, such that the interactive window can reference the same language server as the regular code and keep it around until it's no longer needed. The keys ar... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jakebailey |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/vscode-python git https://github.com/microsoft/vscode-python.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 106462765 |
| octolytics-dimension-repository_nwo | microsoft/vscode-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 49946255 |
| octolytics-dimension-repository_parent_nwo | DonJayamanne/pythonVSCode |
| octolytics-dimension-repository_network_root_id | 49946255 |
| octolytics-dimension-repository_network_root_nwo | DonJayamanne/pythonVSCode |
| 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 | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width