Skip to content

Issues working on workspaces with multiple components subfolders, each with it's own venv. #1032

@Carbaz

Description

@Carbaz

Hard to describe it completely, seems the core of the issue comes that at some point this has been designed for a single project single venv workspace.

I'll try to illustrate the situation with a sequence of screenshots and status/actions.

The screenshots will show four sections:

Note

It's important to mention that this behavior happens the same if the old plugin is removed, so no interference in-between is the root cause of the issue.

Note

Also important to mention that on most "choose environment" actions that uses top drop down the missing venvs are not shown AND there are not a "browse" option, the only way to get the "browse" is using the bottom bar - left side - environment section.

This makes cumbersome to work with notebooks, for example, that each one belongs to a different environment, as many unexpected and not obvious steps has to be taken to properly make them connect to the right venv.

Issue detailed description follows from this point:


We have opened a workspace folder which contains several subfolders each of one belong to a different repository.

I.e: Think of it as each one is a component of a multiservice project.

The old plugin shows them properly:

  • 2 venv environments: One of them is made using uv the other is bare python -m venv .venv.

  • 3 PyEnv python versions available (The default one shown as "Global" here.)

  • 3 pipenv environments: One does not belongs to this project actually but as its centralized is shown, I understand this behavior.

  • The "Workspace environments" properly shows the two venv ones that are in fact .venv folders inside this workspace projects/subfolders.
    (Showing here also which ones of pipenv belongs would be nice, it can be decided by the venvs meta info that is present and can be seen unfolding them, but that's just a side suggestion)

The current plugin is missing one of the venvs, it shown only the one is currently chosen.

Everything else is shown properly, only the venv section does not populates right.

Image

Now we have used the bottom bar - left side - environment section to choose the missing environment and thus it makes the new plugin aware of it.

Image
To make this possible we need to choose the "browse" option as the missing one it's not showing on the drop down.

The old plugin still shows them properly with a exception:

  • The "Workspace environments" now shows the one we just choose duplicated and misses the other one. (We don't care about this now)

The current plugin now correctly shows both venvs.

  • But on the "Python Projects" section the previous one is gone now.
Image

Now we refresh the widgets.

Image

The old plugin now correctly shows both venvs again.

The current plugin is now missing the other venv, it again shows only the one is currently chosen.

Image

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugconfirmation-pendingThe issue needs to be confirmed through a maintainer reproducing the bug.triage-needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions