Skip to content
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

${workspaceFolder} variable not working #258

Closed
thernstig opened this issue Nov 18, 2017 · 3 comments · Fixed by #267
Closed

${workspaceFolder} variable not working #258

thernstig opened this issue Nov 18, 2017 · 3 comments · Fixed by #267
Labels
feature-request Request for new features or functionality
Milestone

Comments

@thernstig
Copy link

thernstig commented Nov 18, 2017

Environment data

VS Code version: 1.18.1
Python Extension version: 0.8.0 (9 November 2017)
Python Version: 3.6.1
OS and version: Windows 10 Home, Version 1703, OS-version 15063.483

Actual behavior

In the settings, when changing "python.pythonPath": "${workspaceRoot}/venv/Scripts/python.exe", to "python.pythonPath": "${workspaceFolder}/venv/Scripts/python.exe", the venv will stop working.

The status bar says "Select Python Environment", indicating it could not find the virtual environment.

image

Expected behavior

It is expected that the virtual environment is found. The status bar should say something similar to:

image

Steps to reproduce:

  • Create a virtual environment inside a workspace
  • Set the python.pythonPath to use ${workspaceFolder}
@DonJayamanne DonJayamanne added awaiting 1-verification bug Issue identified by VS Code Team member as probable bug feature-request Request for new features or functionality and removed bug Issue identified by VS Code Team member as probable bug labels Nov 18, 2017
@DonJayamanne
Copy link

DonJayamanne commented Nov 18, 2017

@thernstig Out of curiosity, why are you changing it to workspaceFolder?
This isn't supported today, the workspaceRoot should be sufficient.

@DonJayamanne DonJayamanne added awaiting 1-decision info-needed Issue requires more information from poster and removed awaiting 1-verification labels Nov 18, 2017
@thernstig
Copy link
Author

thernstig commented Nov 20, 2017

@DonJayamanne workspaceRoot is being deprecated to make it consistent with multi-root workspace support. This was mentioned in version 1.17: https://code.visualstudio.com/updates/v1_17#_workspacefolder-in-launchjson-and-tasksjson

It was further elaborated upon in version 1.18: https://code.visualstudio.com/updates/v1_18#_workspacefolder-replaces-workspaceroot

(congrats on the new job!)

@DonJayamanne
Copy link

@thernstig somehow I missed the new name. Thanks

@DonJayamanne DonJayamanne added awaiting 2-PR and removed awaiting 1-decision info-needed Issue requires more information from poster labels Nov 20, 2017
@DonJayamanne DonJayamanne changed the title workspaceFolder not working ${workspaceFolder} variable not working Nov 20, 2017
@DonJayamanne DonJayamanne added this to the December 2017 milestone Nov 20, 2017
DonJayamanne added a commit that referenced this issue Nov 22, 2017
Fixes #258
* use workspaceFolder token instead of workspaceRoot
* fix typo
* updated to properly describe intent of test
@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants