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

Test: getEnvironmentVariableCollection API #93601

Closed
3 tasks done
Tyriar opened this issue Mar 27, 2020 · 2 comments
Closed
3 tasks done

Test: getEnvironmentVariableCollection API #93601

Tyriar opened this issue Mar 27, 2020 · 2 comments

Comments

@Tyriar
Copy link
Member

Tyriar commented Mar 27, 2020

Refs: #46696

Complexity: 4


This new API allows extensions to contribute to an environment variable collection that enabled modifying environment variables on a process environment. Currently this is only used in the terminal but the naming is left generic so it could be used by other components.

To test, scaffold out an extension and try using the API. Here are some things to test:

  • Read through the docs
  • Try prepending, appending and replacing variables to existing variables and variables that doesn't exist
  • Try running 2 extensions that both contribute to the same variable. These mutations are applied in the reverse order that they are registered, so if the first extension to activate does a Replace, no other extension mutations apply.
  • Try think of any interesting usages outside of the common ones like prepending to PATH or setting language specific settings like JAVA_HOME and see if they also work with this model.
@rebornix
Copy link
Member

Looks good in overall. My only confusion is persistent flag and how it works when reloading the window.

@mjbvz
Copy link
Collaborator

mjbvz commented Mar 31, 2020

Works well overall.

The main issue I ran into is that I couldn't update the PATH on windows: #94069

I was also a little confused about ordering of updates, especially when working with multiple extensions. See #94081

@mjbvz mjbvz closed this as completed Mar 31, 2020
@github-actions github-actions bot locked and limited conversation to collaborators May 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants