Title: Rework search path discovery and processing · Issue #1213 · microsoft/python-language-server · GitHub
Open Graph Title: Rework search path discovery and processing · Issue #1213 · microsoft/python-language-server
X Title: Rework search path discovery and processing · Issue #1213 · microsoft/python-language-server
Description: The search path code (and potentially Interpreter itself) could use a rework. Motivations: Search path management occurs in multiple places, rather than one: Server.InitializeAsync - this only processes searchPaths given in the initializ...
Open Graph Description: The search path code (and potentially Interpreter itself) could use a rework. Motivations: Search path management occurs in multiple places, rather than one: Server.InitializeAsync - this only proc...
X Description: The search path code (and potentially Interpreter itself) could use a rework. Motivations: Search path management occurs in multiple places, rather than one: Server.InitializeAsync - this only proc...
Opengraph URL: https://github.com/microsoft/python-language-server/issues/1213
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Rework search path discovery and processing","articleBody":"The search path code (and potentially `Interpreter` itself) could use a rework. Motivations:\r\n\r\n- Search path management occurs in multiple places, rather than one:\r\n - `Server.InitializeAsync` - this only processes `searchPaths` given in the initialization options, and does quite a bit of work removing and deduplicating items. Some of this is fine, but this is also the place where the `Interpreter` instance is created for the first time.\r\n - `MainModuleResolution.ReloadAsync` - This actually calls out to the interpreter and gets what it considers to be the search paths. Then, things are swapped back and forth between that path list.\r\n- `extraPaths` becomes required for editable installs. This is due to the fact that an editable install uses a `pth` file to modify the interpreter paths, which we then read out and consider to be library code. Only `extraPaths` can move those paths back out to be user code again.\r\n - Perhaps some basic `pth` file support would be useful, specifically something that would only handle editable installs (to start).\r\n- The two places means that only the latter (`ReloadAsync`) is actually executed when something changes; this prevents user configuration from being changed on the fly, and potentially coming out of sync if a package is installed as editable without a reload.\r\n- There are multiple places where an interpreter gets its paths modified and filtered then placed back, which is weird.\r\n\r\nLikely other things, which I'll edit in as I remember them.","author":{"url":"https://github.com/jakebailey","@type":"Person","name":"jakebailey"},"datePublished":"2019-06-17T20:08:43Z","url":"https://github.com/microsoft/python-language-server/issues/1213"}
| 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:90d0fd33-4d89-53dd-c31f-d3254b8956c4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9056:119A4:1CBA6A:258F7E:6AFE57EE |
| html-safe-nonce | c2f9422a5d15b0711bc82cd061773c22b0460ac722238eeb1df67277d82197f5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDU2OjExOUE0OjFDQkE2QToyNThGN0U6NkFGRTU3RUUiLCJ2aXNpdG9yX2lkIjoiNTYyOTQ1OTA1MDYyMjA1NDIyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c9fe463076718bc3bfcf21c3883d9f833c57d7caffd08d52ae677418ad42bfee |
| hovercard-subject-tag | issue:457125562 |
| 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/1213/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3930091f2b8ea887df7e28b7b79ad54c0fe646144389b87c0d02c6a664a2f1d0/microsoft/python-language-server/issues/1213 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3930091f2b8ea887df7e28b7b79ad54c0fe646144389b87c0d02c6a664a2f1d0/microsoft/python-language-server/issues/1213 |
| og:image:alt | The search path code (and potentially Interpreter itself) could use a rework. Motivations: Search path management occurs in multiple places, rather than one: Server.InitializeAsync - this only proc... |
| 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/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 | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width