Skip to content

Is "create environment" the right action on a missing dependency #21334

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

Open
connor4312 opened this issue May 30, 2023 · 4 comments
Open

Is "create environment" the right action on a missing dependency #21334

connor4312 opened this issue May 30, 2023 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug needs proposal Need to make some design decisions

Comments

@connor4312
Copy link
Member

Testing #21289

It seems strange that adding a new dependency to the requirements.txt makes the "Create Environment" button if I already have an environment. If a new dependency comes in, I assume the most common action would to "Update [the] Environment" to include the new package. Maybe that opens a confirmation quickpick where they have an option to create a new environment instead.

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label May 30, 2023
@cwebster-99
Copy link
Member

I had a similar thought process as I have been digging into our package management story. Providing an option to sync the dependency file with the selected environment is a typical user scenario and one that would improve our story here. We could provide an option to sync/update the environment and then Create Environment as a secondary option or based on specific scenario filtering.

@karthiknadig
Copy link
Member

There are a few things to consider here. We should not be updating a global environment, that can pretty much break everything on a user's system.

  1. We could show an Update environment button only if we can certainly identify the selected environment is a virtual environment that belongs to the current workspace.
  2. If the user has selected an environment that is not part of the workspace, but there is one such environment is the workspace then we should show a button that selects the right environment.
  3. If the user has selected an environment that is not part of the workspace, and there is no python that is part of the workspace then we should show create environment.

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jun 2, 2023
@laurikoobas
Copy link

laurikoobas commented Jun 9, 2023

The "Update environment" would also be useful when, for example, pyproject.toml has an error. I formatted project dependencies as object, not list.. and got an error. But there doesn't really seem to be a way to cleanly re-run the "create environment" command.
I can re-run it, but it just considers that it's already completed. It doesn't re-run the failed dependencies installation, for example.

@github-actions
Copy link

github-actions bot commented Jul 9, 2023

Hey @karthiknadig @cwebster-99, this issue might need further attention.

@connor4312, you can help us out by closing this issue if the problem no longer exists, or adding more information.

@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug needs proposal Need to make some design decisions and removed info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team labels Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug needs proposal Need to make some design decisions
Projects
None yet
Development

No branches or pull requests

4 participants