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

Change venvFolders to no longer be anchored to the user's home directory #1479

Open
brettcannon opened this issue Apr 24, 2018 · 19 comments
Open
Labels
area-environments Features relating to handling interpreter environments debt Covers everything internal: CI, testing, refactoring of the codebase, etc. needs proposal Need to make some design decisions

Comments

@brettcannon
Copy link
Member

brettcannon commented Apr 24, 2018

We discovered during our bug bash that venvFolders exists but isn't documented. Either we leave it, document it, and potentially not make (at least) our pyenv support depend on .pyenv being in it, or we remove the setting and use the documented functionality of pyenv directly.

@brettcannon brettcannon added debt Covers everything internal: CI, testing, refactoring of the codebase, etc. needs decision labels Apr 24, 2018
@brettcannon brettcannon changed the title Decide about venvFolders Create the venvPaths settings to merge venvFolders and venvPath May 23, 2018
@brettcannon
Copy link
Member Author

brettcannon commented May 23, 2018

  1. Make pyenv and direnv support not rely on venvFolders
  2. Create venvPaths which is an array of directories which contain virtual environments
  3. Deprecate venvFolders and venvPath
  4. Make sure environments list gets updated when settings change

@brettcannon brettcannon added this to the June 2018 milestone May 23, 2018
@brettcannon brettcannon removed this from the June 2018 milestone Jun 4, 2018
@brettcannon
Copy link
Member Author

brettcannon commented Jul 13, 2018

#2142 is a motivator for venvPaths available.

@brettcannon
Copy link
Member Author

We may want to consider skipping step 2 and modifying step 3 to only worry about venvPath as the naming of venvFolders makes a little bit more sense in isolation then venvPaths.

@ericsnowcurrently
Copy link
Member

@DonJayamanne DonJayamanne added the needs proposal Need to make some design decisions label May 9, 2019
@brettcannon brettcannon changed the title Create the venvPaths settings to merge venvFolders and venvPath Change venvFolders to no longer be anchored to the user's home directory Jun 14, 2019
@brettcannon
Copy link
Member Author

Since we now know how to patch a user's setting we can actually drop venvPath and then change a user's preexisting settings to append ~/ to entries (or something along those lines).

@brettcannon
Copy link
Member Author

Once this is done we will also need to request appropriate documentation (as well as for WORKON_HOME).

@gramster gramster added area-environments Features relating to handling interpreter environments and removed area-environments Features relating to handling interpreter environments feature-interpreter labels Oct 10, 2019
@claytonlemons
Copy link

I ran across this issue because I have the following use case:

  • rootWorkspaceDir (not relative to homeDir)
    • subProject1Dir
      • venvDIr
    • subProject2Dir
      • venvDIr

Making venvFolders not relative to the user's home dir would allow me to specify each subproject once and easily switch between the corresponding environments as I switch between projects. The current workaround is to update venvPath or pythonPath each time I switch.

@brettcannon
Copy link
Member Author

Did this ticket just get forgotten about?

Honestly, yes. We have been very focused in the interim time this issue was opened by completely rewriting the environment discovery code, iterating on the quick pick menu, and then getting an extension API for other extensions to use. Now that's all finished, we can look to try and pick this up in 2023.

@leifwalsh
Copy link

leifwalsh commented Dec 8, 2022

Cool, thank you!

@karrtikr karrtikr removed their assignment Oct 26, 2023
@rhewy
Copy link

rhewy commented Jan 4, 2024

Should venvPaths exist in version v2023.14.0 of the python extension?

@brettcannon
Copy link
Member Author

Should venvPaths exist in version v2023.14.0 of the python extension?

No; see https://github.com/microsoft/vscode-python/blob/main/package.json for all the settings we support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-environments Features relating to handling interpreter environments debt Covers everything internal: CI, testing, refactoring of the codebase, etc. needs proposal Need to make some design decisions
Projects
None yet
Development

No branches or pull requests