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

Incorporate fixes from VSCode regarding Environment collection API #20822

Closed
21 of 22 tasks
karrtikr opened this issue Mar 9, 2023 · 1 comment
Closed
21 of 22 tasks

Incorporate fixes from VSCode regarding Environment collection API #20822

karrtikr opened this issue Mar 9, 2023 · 1 comment
Assignees
Labels
area-terminal feature-request Request for new features or functionality on-testplan Added to test plan
Milestone

Comments

@karrtikr
Copy link

karrtikr commented Mar 9, 2023

Results from spike #20492. Issues to tackle next to start using environment variables for activation:

Once these are done, implement using them in the Python extension:

@karrtikr karrtikr added feature-request Request for new features or functionality area-terminal needs proposal Need to make some design decisions labels Mar 9, 2023
@karrtikr karrtikr self-assigned this Mar 9, 2023
@karrtikr

This comment was marked as resolved.

@karrtikr karrtikr added this to the May 2023 milestone May 9, 2023
@karrtikr karrtikr modified the milestones: May 2023, June 2023 May 25, 2023
karrtikr pushed a commit that referenced this issue May 26, 2023
…n in `pythonTerminalEnvVarActivation` experiment (#21290)

For #11039 #20822
Closes #21297

Update proposed APIs to be used in Terminal activation experiment.
@karthiknadig karthiknadig modified the milestones: June 2023, July 2023 Jun 26, 2023
@karrtikr karrtikr modified the milestones: July 2023, August 2023 Jul 24, 2023
karrtikr pushed a commit that referenced this issue Aug 10, 2023
For microsoft/vscode#171173
#20822

To be merged tomorrow when latest insiders is released. Blocked on
microsoft/vscode#189979.
@github-actions github-actions bot added the on-testplan Added to test plan label Aug 14, 2023
@github-actions github-actions bot removed the needs proposal Need to make some design decisions label Aug 28, 2023
karrtikr pushed a commit that referenced this issue Aug 28, 2023
…ctivation` experiment (#21879)

For #944 #20822 

We only apply those env vars to terminal which are not in process env
variables, hence remove custom env vars from process variables.
karrtikr pushed a commit that referenced this issue Aug 31, 2023
For #20822 #11039

Replacing as-is has its problems, for eg. pyenv asks their users to
manipulate `PATH` in their init script:
https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv,
which we could end up replacing.


![image](https://github.com/microsoft/vscode-python/assets/13199757/cc904f76-8d42-47e1-a6c8-6cfff6543db8)

Particularly for pyenv, it mean users not being able to find pyenv:


![image](https://github.com/microsoft/vscode-python/assets/13199757/26100328-c227-435b-a4f2-ec168099f4c1)

Prepending solves it for cases where initial PATH value is suffix of the
final value:


![image](https://github.com/microsoft/vscode-python/assets/13199757/a95e4ffd-68dc-4e73-905e-504b3051324f)

But, in other cases, this means that we end up with the whole `PATH`
thrice. This is because it prepends it twice:
- Once in shell integration script
- Once when creating a process

So the final value could be:
```
PATH=<activated_full_path><activated_full_path><original_path>
```
where `<activated_full_path>` refers to value of `PATH` environment
variable post activation. eg.


![image](https://github.com/microsoft/vscode-python/assets/13199757/7e771f62-eb53-49be-b261-d259096008f3)
anthonykim1 pushed a commit to anthonykim1/vscode-python that referenced this issue Sep 12, 2023
anthonykim1 pushed a commit to anthonykim1/vscode-python that referenced this issue Sep 12, 2023
anthonykim1 pushed a commit to anthonykim1/vscode-python that referenced this issue Sep 12, 2023
…ctivation` experiment (microsoft#21879)

For microsoft#944 microsoft#20822 

We only apply those env vars to terminal which are not in process env
variables, hence remove custom env vars from process variables.
anthonykim1 pushed a commit to anthonykim1/vscode-python that referenced this issue Sep 12, 2023
For microsoft#20822 microsoft#11039

Replacing as-is has its problems, for eg. pyenv asks their users to
manipulate `PATH` in their init script:
https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv,
which we could end up replacing.


![image](https://github.com/microsoft/vscode-python/assets/13199757/cc904f76-8d42-47e1-a6c8-6cfff6543db8)

Particularly for pyenv, it mean users not being able to find pyenv:


![image](https://github.com/microsoft/vscode-python/assets/13199757/26100328-c227-435b-a4f2-ec168099f4c1)

Prepending solves it for cases where initial PATH value is suffix of the
final value:


![image](https://github.com/microsoft/vscode-python/assets/13199757/a95e4ffd-68dc-4e73-905e-504b3051324f)

But, in other cases, this means that we end up with the whole `PATH`
thrice. This is because it prepends it twice:
- Once in shell integration script
- Once when creating a process

So the final value could be:
```
PATH=<activated_full_path><activated_full_path><original_path>
```
where `<activated_full_path>` refers to value of `PATH` environment
variable post activation. eg.


![image](https://github.com/microsoft/vscode-python/assets/13199757/7e771f62-eb53-49be-b261-d259096008f3)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2023
@anthonykim1 anthonykim1 self-assigned this Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-terminal feature-request Request for new features or functionality on-testplan Added to test plan
Projects
None yet
Development

No branches or pull requests

3 participants