Skip to content

Commit

Permalink
Do not update global python.defaultInterpreterPath when a runtime s…
Browse files Browse the repository at this point in the history
…tarts (#5054)

Addresses #4552 

I want to point out #3255 where we _added_ updating the path in the
workspace. I suspect (???) that updating the setting globally was never
the right thing to do; this was added in the massive
posit-dev/positron-python#413 for multi-session
support.

This PR does not address how updating the
`python.defaultInterpreterPath` user setting starts Python. I have [some
more notes
here](#4552 (comment))
and we can open a followup PR if folks think this is a problem. It seems
mostly like intended/inherited behavior from upstream to me.

### QA Notes

- Open a workspace and have R only running.
- Open an additional workspace and have R only running.
- Start a Python runtime in the second workspace via the top bar.

You should _not_ see any Python runtime start in the first
workspace/window.

We should still see the correct behavior for #3169 and #3255.

I don't think we can write a useful unit test for this and we don't
currently have multi-workspace tests. It might be worth putting that
(smoke tests for multiple workspaces) on the todo list eventually but
certainly seems like an advanced move.
  • Loading branch information
juliasilge authored Oct 18, 2024
1 parent dd5b401 commit 33c8016
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion extensions/positron-python/src/client/positron/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ export class PythonRuntimeSession implements positron.LanguageRuntimeSession, vs
await this._installIpykernel();

// Update the active environment in the Python extension.
this._interpreterPathService.update(undefined, vscode.ConfigurationTarget.Global, this.interpreter.path);
this._interpreterPathService.update(
undefined,
vscode.ConfigurationTarget.WorkspaceFolder,
Expand Down

0 comments on commit 33c8016

Please sign in to comment.