posit-dev / positron

Positron, a next-generation data science IDE
Other
2.38k stars 70 forks source link

Support for running scripts in separate process #3173

Open jthomasmock opened 4 months ago

jthomasmock commented 4 months ago

We have integrated testing and build processes into alternate panes or background processes as mentioned in #1303

However, we don't fully support running arbitrary user code in separate processes but the same runtime, i.e., Background Jobs from RStudio. Given that we only have one console, it feels a bit awkward to need to drop into the terminal and lose all of the default behavior to execute long-running scripts in the background.

These may not be as necessary given Python apps/APIs are typically run via the terminal and the Shiny extension runs R/Python via the terminal but it does feel like a gap compared to RStudio.

I also saw this recently of a VS Code R user asking for the jobs R package to work with VS Code: https://twitter.com/strengejacke/status/1791224380602622355

jmcphers commented 3 months ago

RStudio's Background Jobs have been pretty popular but I think for Positron we could do better. The distinction between the foreground/background session feature in RStudio is a sort of artifact of the fact that RStudio can only have one foreground R session. Positron is designed to have several. So in my view we could build this out as more of a multi-session feature, wherein you can shelve sessions to the background while they are computing and then re-attach them to your UI when they're done.

Which is not to say that we can't support background jobs, just that the API would look more like "start a new session and don't make it the foreground" than anything else.

jthomasmock commented 3 months ago

Totally agree Jonathan! I just didn't want to lose on what was part of the initial ask in #1303 of multiple interactive sessions or background processes, likely with all the benefits of Positron's integrations rather than just a fairly "barebone" terminal.

juliasilge commented 2 months ago

Request for multiple consoles from a private beta user: https://github.com/posit-dev/positron-beta/discussions/224

rmflight commented 2 months ago

Given that multiple consoles / terminals is one of the "killer features" of VSCode, this feels like a "must have" eventually. Glad to see it's on the radar, whether it's for having "background jobs" or just "multiple consoles".

abduazizR commented 2 months ago

Not sure if I can comment here, but just want to confirm that these features are not yet implemented but they're in the developers' plans, right?

juliasilge commented 2 months ago

Yes, that's right @abduazizR! This feature is not slated for immediate work but it is helpful to know how important it is for our users so adding a 👍 or similar is most welcome.