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

Default runtime for new workspaces should be last used runtime #1181

Open
Tracked by #3541
jmcphers opened this issue Aug 28, 2023 · 2 comments
Open
Tracked by #3541

Default runtime for new workspaces should be last used runtime #1181

jmcphers opened this issue Aug 28, 2023 · 2 comments
Labels
area: core Issues related to Core category.

Comments

@jmcphers
Copy link
Collaborator

jmcphers commented Aug 28, 2023

Currently, the default runtime for new workspaces is always R if you're an RStudio user, which will be frustrating for Python users who happen to have RStudio installed.

Only the very first boot of Positron should use RStudio detection; after that, we should establish a global default based on whatever has been used recently.

Note that we need to be careful to ensure that only system installations of R and Python can be set as global defaults.

Via @jjallaire:

Internal Python users will all have RStudio installed so will be perpetually caught in R as the default. We should just have a single piece of global state which is the last used runtime and use that heuristic (the RStudio user heuristic should only be for first run of the product.

@jmcphers jmcphers added this to the Internal Preview milestone Aug 28, 2023
@wesm wesm added the area: core Issues related to Core category. label Feb 29, 2024
@juliasilge
Copy link
Contributor

In #5795 we have someone who is an R user and doesn't have RStudio installed, and these users also would benefit from this fix.

Originally posted by @mattkerlogue in #5795:

Apologies if this is a duplicate, I searched both issues and discussions but couldn't find anything similar.

Would it be possible to add a setting within say User > Position > Interpreters to set a default/fallback interpreter (e.g. none (the default), Python, R)?

For existing projects I'm aware Positron makes an informed choice about whether to start in R or Python. But I'm thinking about when I open a new window/session that's not linked to a project/folder.

I noted the following on the Positron website:

Positron tries to start R for R users and Python for Python users by checking to see whether RStudio is installed and has been recently used. The latter check is done by looking in ~/.local/share/rstudio for files written less than a month ago, so if you don’t want Positron to consider you to be an RStudio user, you can remove this folder or rename it temporarily.

The issue for me however is that I've just had to have our corporate IT team do a rebuild of my laptop due to an unrelated issue and so I'm having to reinstall software etc. After a near 6-months of solely using Positron I'm not intending (at this stage) to install/open RStudio on the machine and so don't currently have a ~/.local/share/rstudio folder.

As primarily a R-based user it would be nice to have a setting within Positron itself to set a default/fallback interpreter so that in a new/unattached session it automatically starts up with the interpreter of my choice.

@mattkerlogue
Copy link

Thanks @juliasilge.

I can see the sense in the defaulting to the most recently used runtime, however as primarily an R user that occasionally works with Python projects I think I'd still find it slightly annoying when I open up a new workspace and that happened to start in Python just because that was the last thing I happened to be working on.

To expand on my thoughts re-posted by Julia, I do still think it would be helpful to have a user-editable setting that control the default runtime, say with three settings:

  • an "auto" option, the default, which loads with the last-used runtime
  • "Python" and "R" options, which load with the system install of either Python/R

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues related to Core category.
Projects
None yet
Development

No branches or pull requests

5 participants