posit-dev / positron

Positron, a next-generation data science IDE
https://positron.posit.co
Other
2.82k stars 90 forks source link

Restarting the extension host breaks interpreter switching #5427

Open juliasilge opened 1 day ago

juliasilge commented 1 day ago

System details:

Positron and OS details:

Positron Version: 2024.12.0 (Universal) build 48 Code - OSS Version: 1.93.0 Commit: 3d0cc4120c986c64ba7f3871ade3854654c32477 Date: 2024-11-20T02:45:46.693Z Electron: 30.4.0 Chromium: 124.0.6367.243 Node.js: 20.15.1 V8: 12.4.254.20-electron.0 OS: Darwin arm64 24.0.0

Interpreter details:

Seems to apply to all interpreters I've tried

Describe the issue:

If the extension host is restarted (for example, when making changes to installed extensions or via "Restart Extension Host"), something about the Language Runtime Service (???) is no longer hooked up correctly. The green dots in the interpreter dropdown are gone (even if interpreters are up and running) and you can't choose a non-running interpreter to start, from either the interpreter dropdown or "Python: Select Interpreter".

Steps to reproduce the issue:

  1. Have an R and Python interpreter up and running.
  2. Run "Restart Extension Host" from the command palette.
  3. Notice here that your runtimes are up and running correctly.
  4. Try to interact with the interpreter dropdown.

Image

Notice that there are no green buttons, even though both R and Python runtimes have reconnected. You can switch between the running R and Python runtimes by clicking in the dropdown, but you cannot switch to a different runtime via the ....

  1. Try to change Python interpreters from the command palette via "Python: Select Interpreter". Your existing interpreter will shut down but the new one will not start.
  2. Go over to the R console and click the "Restart console" button. It will shut down but not start up again.

Expected or desired behavior:

Starting, restarting, stopping, and switching runtimes should work after an extension host restart.

Were there any error messages in the UI, Output panel, or Developer Tools console?

I suspect the new kernel supervisor here, but I did not see anything dramatically obvious in its logs.

jmcphers commented 5 hours ago

I believe this was fixed by the changes in https://github.com/posit-dev/positron/pull/5418.