Skip to content

Conversation

@collinmurch
Copy link

@collinmurch collinmurch commented Nov 28, 2024

Recently ran into a QoL issue in VSCode where my Homebrew installations of python3 were being counted as "Virtual Environments". There are several Homebrew packages that install to the /opt/homebrew/bin directory (where Python does) that start with the pattern activate*.

For example, activate-global-python-argcomplete.

Really, we should only consider it a virtual environment directory if the activate script we look for has some arbitrary extension, not just starts with the string activate. Hopefully this can save people in the future from going down the rabbit hole I did.

@karthiknadig karthiknadig self-assigned this Nov 28, 2024
@karthiknadig karthiknadig added the bug Issue identified by VS Code Team member as probable bug label Nov 28, 2024
@karthiknadig karthiknadig enabled auto-merge (squash) December 9, 2024 02:07
@vs-code-engineering vs-code-engineering bot added this to the February 2025 milestone Dec 9, 2024
@DonJayamanne
Copy link
Collaborator

DonJayamanne commented Dec 10, 2024

Unfortunately on unix, the activation script can just be a file named activate without any file extension.
Hence cannot take this file as is.

Please can you file an issue for this. generally we start with an issue, then create a PR that resolves the issue.
In the Issue we can probably discuss the solution, as the current solution doesn't work

E.g. we could look for files like activate or activate., perhaps that should fix it.

Or perhaps we might need to revise the algorithm, e.g. clearly home brew should never be treated as virtual envs, even if they contain activation scripts.

auto-merge was automatically disabled December 10, 2024 02:00

Pull request was closed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants