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

Add getEnvironmentVariables and onDidEnvironmentVariablesChange to IExtensionApi #15112

Closed
jakebailey opened this issue Jan 8, 2021 · 2 comments
Assignees
Labels
area-environments Features relating to handling interpreter environments area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. feature-request Request for new features or functionality needs PR Ready to be worked on on-testplan Added to test plan
Milestone

Comments

@jakebailey
Copy link
Member

For #15106, I'll be adding PYTHONPATH to the LS config message, like we do the actual path to the interpreter. But, our plan is to move the client out of this extension and into Pylance (similar to how pyright is run) to reduce release friction (among other benefits in abstracting to the LSP conn). This will mean that there's no way to fetch PYTHONPATH anymore as it's effectively out-of-proc.

Similarly to the addition of getExecutionDetails and onDidChangeExecutionDetails, I'd like to have getEnvironmentVariables and onDidEnvironmentVariablesChange available to other extensions.

The interface for the environment variables is pretty small; just the event and the function that returns a Record of the environment variables. This API is already fast (cached per workspace, but really only a file read).

@jakebailey jakebailey added feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team labels Jan 8, 2021
@kimadeline kimadeline added area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. needs decision and removed triage-needed Needs assignment to the proper sub-team labels Jan 11, 2021
@luabud luabud added needs spike Label for issues that need investigation before they can be worked on. and removed needs decision labels Mar 10, 2021
@karrtikr karrtikr self-assigned this Sep 7, 2022
@karrtikr karrtikr added the area-environments Features relating to handling interpreter environments label Sep 7, 2022
@karrtikr karrtikr added this to the September 2022 milestone Sep 7, 2022
@karrtikr karrtikr modified the milestones: September 2022, October 2022 Sep 26, 2022
@karrtikr
Copy link

karrtikr commented Oct 13, 2022

@karrtikr
Copy link

karrtikr commented Oct 13, 2022

I have decided that getting activated environment variables for a particular environment and workspace should be a separate API than this, as that seems to me like overloading the same API.

FYI @karthiknadig as you described this as an issue here: https://github.com/microsoft/vscode-python/wiki/Proposed-Environment-APIs#request-for-getenvironmentvariables-and-ondidchangegetenvironmentvariables

@karrtikr karrtikr added needs PR Ready to be worked on and removed needs spike Label for issues that need investigation before they can be worked on. labels Oct 18, 2022
@karrtikr karrtikr added the on-testplan Added to test plan label Oct 24, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. feature-request Request for new features or functionality needs PR Ready to be worked on on-testplan Added to test plan
Projects
None yet
Development

No branches or pull requests

4 participants