Positron doesn't start the R version a rig project needs
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 54/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- r, typescript
- Domain
- desktop, developer-experience
Research direction
Start by tracing R runtime selection and project detection in Positron, including how workspace last-used runtimes are chosen and how Python .venv selection is handled. Check the session picker and Welcome page runtime labels, then look for tests covering runtime discovery and project detection. Done means a synced rig project selects its matching real R installation, identifies the runtime as a rig project, and recognizes rproj.toml as an R project.
Written by the indexing model from the issue text.
Description
Summary
When a folder is a synced rig project, Positron doesn't use the project's R version when it chooses which R to start. It picks R the way it would for any folder: the R last used in the workspace, then the pinned default, then the current R. If that R is a different minor version from the one the project was built for, rig turns off the project library. The user ends up in their normal user library, and nothing in Positron explains why.
Background
rig proj sync creates a .rvenv folder in the project:
.rvenv/bin/Ris a shell wrapper. It sets some environment variables and then runs a fixed system R, for example/Library/Frameworks/R.framework/Versions/4.6/Resources/bin/R..rvenv/rvenv.cfgrecords the R minor version the project was built for (r-minor)..rvenv/libis the project library.
There is no separate R installation inside .rvenv. The project library is turned on by the project .Renviron and the rvenv shim package, so any R started in the folder runs it. If the running R's minor version doesn't match r-minor, the shim keeps the project library off and prints "Project needs R X.Y, this is R X.Z."
Steps to reproduce
- Install R 4.5 and R 4.6, for example with rig.
- Open a folder in Positron and start R 4.5, so 4.5 becomes the R used in that workspace.
- In that folder, create a rig project for R 4.6 and run
rig proj sync. - Reopen the folder in Positron.
Expected: Positron starts R 4.6, and .libPaths()[1] is .rvenv/lib.
Actual: Positron starts R 4.5 (start reason affiliatedRuntime), and the project library is not active. The session picker has no entry that shows it belongs to the rig project, so users don't see that R 4.6 is the one to choose.
Suggested fix
- When the workspace has
.rvenv/rvenv.cfg, use the R the project was built for. Read the absolute R path from the last line of.rvenv/bin/R, or matchr-minorfromrvenv.cfgagainst the R versions Positron found. - Let this beat the workspace's last-used R when the two disagree, much like a project
.venvis chosen for Python. - Label that runtime in the session picker and Welcome page with a reason such as "rig project".
- Add
rproj.tomlto the files that make a folder count as an R project, so R starts right away in these folders.
Using .rvenv/bin/R as a custom binary doesn't work: the wrapper has no R_HOME_DIR line, so discovery rejects it. Ark also starts R from R_HOME, not through the wrapper. That's another reason to pick the real R installation, not the wrapper.
Workaround
Start the matching R version from the session picker in the project folder. After that it's the R Positron uses there, and the project library turns on.
Versions
Positron 2026.11.1 build 4, rig 0.11.1, macOS arm64.
- Dominant language
- TypeScript
- Stars
- 4.4k
- Forks
- 207
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 308
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from posit-dev/positron
-
area: assistant area: ui
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
accessibility area: plots area: ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area: plots area: ui bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area: kernels lang: r
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
posit-dev/positron#17575 · 2 comments ·
Maintainers usually reply within 1 day
-
Memory meter counts page cache as used memory under a cgroup limitPossibly taken @jmcphers claimed this 10 days ago. Openarea: workbench bug memory-use support
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
posit-dev/positron#17414 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
All issues in posit-dev/positron
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Vessel9817/onion-site-template#512 ·
Maintainers usually reply within 1 day
-
nightly-tests
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
BlackBeltTechnology/pi-agent-dashboard#1256 ·
Maintainers usually reply within 1 day
-
approved
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
fritzprix/libr-agent#3266 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
better-auth/better-auth#13101 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day