-
Notifications
You must be signed in to change notification settings - Fork 144
Global library present despite Pixi R interpreter #11107
Description
System details:
Positron and OS details:
Positron Version: 2026.01.0 build 85
Code - OSS Version: 1.106.0
Commit: bbe2c76
Date: 2025-12-12T07:22:08.514Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin x64 24.6.0
Session details:
R 4.5.2
Describe the issue:
Now that there is experimental support for Pixi R interpreter discovery (#3724, amazing that this is done!), I would expect only to be able to use packages installed with Pixi, however I can still access global libraries which defeats the reproducibility gains of using Pixi with a separate R installation.
Steps to reproduce the issue:
- Install latest build of Positron
- Enable Pixi R interpreter discovery
- Start project that has a
pixi.tomlfile - Install R with
pixi add r-base - Open Positron and choose the Pixi R interpreter
- See
.libPaths()
> .libPaths()
[1] "/Users/roaldarbol/Library/R/x86_64/4.5/library"
[2] "/Users/roaldarbol/Projects/Papers/Belay-Paper/.pixi/envs/default/lib/R/library"For example, in the above, I have only installed r-base from conda-forge, but am still able to load dplyr:
> library(dplyr)
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, unionExpected or desired behavior:
I would expect to only have access to the Pixi libraries.
Other
I understand that this is not just as easy as this; what would we for example expect from install.packages in such a case? Just to add the packages to the Pixi libpath, but without adding them to pixi.toml. I started a while back making the rpix package that installs packages with Pixi from the R console (it basically relays messages with system()). Maybe that would be worth co-opting to mask install.packages? Would be more than happy to assist where possible.