Title: ${workspaceFolder} in extraPaths resolved unexpectedly · Issue #1974 · microsoft/python-language-server · GitHub
Open Graph Title: ${workspaceFolder} in extraPaths resolved unexpectedly · Issue #1974 · microsoft/python-language-server
X Title: ${workspaceFolder} in extraPaths resolved unexpectedly · Issue #1974 · microsoft/python-language-server
Description: Environment data Language Server version: 0.5.45.0 OS and version: Windows 10 1809 Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.7 64-bit Visual Studio Code version: 1.43.2 Expected behaviour The variable ${wor...
Open Graph Description: Environment data Language Server version: 0.5.45.0 OS and version: Windows 10 1809 Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.7 64-bit Visual Studio Code version: 1.43...
X Description: Environment data Language Server version: 0.5.45.0 OS and version: Windows 10 1809 Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.7 64-bit Visual Studio Code version: ...
Opengraph URL: https://github.com/microsoft/python-language-server/issues/1974
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"${workspaceFolder} in extraPaths resolved unexpectedly","articleBody":"\u003c!-- \r\nRead the guidelines for filing an issue first. \r\n\r\nhttps://github.com/microsoft/python-language-server/blob/master/TROUBLESHOOTING.md#filing-an-issue\r\n-->\r\n\r\n## Environment data\r\n\u003c!--\r\nTo find your version: \r\n\r\nSelect \"View: Toggle Output\" from the command palette (Ctrl+Shift+P on Windows/Linux, Command+Shift+P on macOS), then select \"Python\" in the dropdown on the right (\"Python Language Server\" if running Insiders build of VS Code). Look for the line Microsoft Python Language Server version X in the console.\r\n-->\r\n\r\n- Language Server version: 0.5.45.0 \r\n- OS and version: Windows 10 1809\r\n- Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.7 64-bit\r\n- Visual Studio Code version: 1.43.2\r\n\r\n## Expected behaviour\r\nThe variable `${workspaceFolder}` within the setting `\"python.autoComplete.extraPaths\"` is resolved to the correct workspace folder. For a project folder `C:/temp/myproject`, `${workspaceFolder}/sublibs` should be resolved to `C:/temp/myproject/sublibs` and `${workspaceFolder}/../sublibs` should be resolved to `C:/temp/sublibs`.\r\n\r\n## Actual behaviour\r\nThe settings\r\n```\r\n{ \"python.autoComplete.extraPaths\": [\"${workspaceFolder}/sublibs\"] }\r\n```\r\nlead to missing auto complete for `sublibs`, the user search path in the output is\r\n```\r\n[Info - 14:39:21] User search paths:\r\n[Info - 14:39:21] C:\\temp\\myproject\\${workspaceFolder}\\sublibs\r\n```\r\n\r\nThe settings\r\n```\r\n{ \"python.autoComplete.extraPaths\": [\"${workspaceFolder}/../sublibs\"] }\r\n```\r\n\"fix\" the problem, the user search path in the output is\r\n```\r\n[Info - 14:41:42] User search paths:\r\n[Info - 14:41:42] C:\\temp\\myproject\\sublibs\r\n```\r\nHowever, the expected path is `C:\\temp\\sublibs`.\r\n\r\n\r\n\u003c!-- \r\n## Logs\r\n\r\nEnable trace logging by adding \"python.analysis.logLevel\": \"Trace\" to your settings.json configuration file.\r\n\r\nAdding this will cause a large amount of info to be printed to the Python output panel. This should not be left long term, as the performance impact of the logging is significant.\r\n\r\n```\r\nXXX\r\n```-->\r\n\r\n## Additional lnformation\r\nApparently, to get the correct workspace folder, I need to write `${workspaceFolder}/../`. If `${workspaceFolder}` is not followed by `..`, it is not resolved at all.\r\n\r\nOf course, there is the workaround to use relative paths instead of this variable.\r\n\u003c!--\r\nNote: If you think a GIF of what is happening would be helpful, consider tools like https://www.cockos.com/licecap/, https://github.com/phw/peek or https://www.screentogif.com/ .\r\n\r\n```python\r\nXXX\r\n```-->\r\n\r\n","author":{"url":"https://github.com/tpajenkamp-dspace","@type":"Person","name":"tpajenkamp-dspace"},"datePublished":"2020-03-27T14:12:30Z","url":"https://github.com/microsoft/python-language-server/issues/1974"}
| 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:7305ccc9-36d2-21d5-d7af-ae9d70812fdd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C58A:15B330:275473:337054:6AFE5C76 |
| html-safe-nonce | 2c4bca0dcc656f46fc42065b1ee26c9ef90ca555371d830b87b1afe23627f630 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNThBOjE1QjMzMDoyNzU0NzM6MzM3MDU0OjZBRkU1Qzc2IiwidmlzaXRvcl9pZCI6Ijc0MDA0Nzc5MTk4MjAwMTI2NjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | bb08e2903aae22eb28e2ad9b82afaf4d22ab7e6f23a6102649e1651914a5d5af |
| hovercard-subject-tag | issue:589161758 |
| 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/1974/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0fb67e0f9b7df3f3e39b49364cf0baa03f00490f10dfaf232e9bc9e34dbcbfde/microsoft/python-language-server/issues/1974 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0fb67e0f9b7df3f3e39b49364cf0baa03f00490f10dfaf232e9bc9e34dbcbfde/microsoft/python-language-server/issues/1974 |
| og:image:alt | Environment data Language Server version: 0.5.45.0 OS and version: Windows 10 1809 Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.7 64-bit Visual Studio Code version: 1.43... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tpajenkamp-dspace |
| 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