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

Prompt users if they already have a .venv #19894

Closed
bamurtaugh opened this issue Sep 27, 2022 · 3 comments · Fixed by #19925
Closed

Prompt users if they already have a .venv #19894

bamurtaugh opened this issue Sep 27, 2022 · 3 comments · Fixed by #19925
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug needs PR Ready to be worked on verified Verification succeeded

Comments

@bamurtaugh
Copy link
Member

Testing #19883

I already have a .venv in my project. I was curious what would happen if I went through the Python: Create Environment steps again. I can't tell if anything happened. Should we prompt users if they already have a .venv, allowing them to choose to override it or back out of creating a new .venv and just use the existing one? The Dev Containers extension works similarly: if a user chooses the command to add a dev container config and they already have one, they're asked if they'd like to override or just use the existing one.

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Sep 27, 2022
@karthiknadig karthiknadig added this to the September 2022 milestone Sep 28, 2022
@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug area-environments Features relating to handling interpreter environments needs PR Ready to be worked on and removed triage-needed Needs assignment to the proper sub-team labels Sep 28, 2022
@karrtikr
Copy link

karrtikr commented Oct 3, 2022

@karthiknadig Try using

const currentInterpreterPathDisplay = this.pathUtils.getDisplayName(
for displaying a user friendly path:

image

@karrtikr karrtikr added the verification-found Issue verification failed label Oct 3, 2022
@karrtikr
Copy link

karrtikr commented Oct 3, 2022

We should probably mention in the prompt and the logs that we just selected the existing .venv in the workspace.

@karthiknadig
Copy link
Member

Temporary resolution here is that we auto-select the existing environment for now, as the intended users of this command are beginners. This is done.

If we see that people are getting confused by auto-selection, we can provide bit more clarification. For venv there is no way to override other than deleting and re-creating, so we will defer that for now.

For issues mentioned by @karrtikr I have created separate bugs.

@karthiknadig karthiknadig removed the verification-found Issue verification failed label Oct 3, 2022
karthiknadig added a commit that referenced this issue Oct 3, 2022
Closes #19889
Closes #19890
Closes #19891
Closes #19894
Closes #19897
Closes #19852
Closes #19851
Closes #19838
Closes #19916
Closes #19917
eleanorjboyd pushed a commit to eleanorjboyd/vscode-python that referenced this issue Oct 4, 2022
@TylerLeonhardt TylerLeonhardt added the verified Verification succeeded label Oct 4, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug needs PR Ready to be worked on verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants