Skip to content

Global library present despite Pixi R interpreter #11107

@roaldarbol

Description

@roaldarbol

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:

  1. Install latest build of Positron
  2. Enable Pixi R interpreter discovery
  3. Start project that has a pixi.toml file
  4. Install R with pixi add r-base
  5. Open Positron and choose the Pixi R interpreter
  6. 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:dplyrThe following objects are masked frompackage:stats:

    filter, lag

The following objects are masked frompackage:base:

    intersect, setdiff, setequal, union

Expected 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    info neededWaiting on information

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions