-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Jupyter API to get Env associated with Notebooks #24358
Conversation
For what it's worth, we don't do this now. The vscode-languageclient-npm module does. So theoretically any language can listen for notebook events, not just Pylance. |
How does Pylance get the Python env associated with a notebook? |
We ask the python extension for the environment for the current file. This happens after we get the notebook changed event. |
awesome, then this change will make this workflow work properly What I'm getting at is Pylance will not need the I.e. just use |
e9d92b5
to
862bd66
Compare
If the changes appear safe, you can manually trigger the pipeline by commenting |
Closing to push this branch upstream. |
See microsoft/vscode-jupyter#15987 Should also fix microsoft/vscode-jupyter#16112 Should also avoid Pylance having to monitor notebook changes and then trying to figure out the Environment for a Notebook. previous discussion here #24358
See microsoft/vscode-jupyter#15987
Should also fix microsoft/vscode-jupyter#16112
Should also avoid Pylance having to monitor notebook changes and then trying to figure out the Environment for a Notebook.
@rchiodo @heejaechang @debonte Please can you let me know if this works
I.e. going forward (we can plan how we roll this out)
onDidChangeActiveEnvironmentPath
will be triggered with the corresponding UriI believe this should simplify things.
@karthiknadig /cc