Skip to content

Switch 'r.packageInstall' command/task in R extension to not use pak #2955

Closed

Description

@juliasilge

We've gotten a fair amount of feedback that using pak here for local installation of a package is not working out great:

rcode: 'pak::local_install(upgrade = FALSE)',
package: 'pak'

We have heard this in usability testing, in https://github.com/posit-dev/positron-beta/discussions/16, and in https://github.com/posit-dev/positron-beta/issues/158. Let's switch to something more similar to what RStudio does here, i.e. R CMD install --preclean --no-multiarch --with-keep.source .. It will take just a tiny bit of rearranging because right now all those tasks use R code.

Activity

  1. added this to the Release Candidate milestone on May 6, 2024
  2. jennybc commented on Jul 12, 2024

    @jennybc
    Member

    I do hope that it remains easy to use pak for this, while allowing folks (or even defaulting) to use another approach. So when we prioritize this, I'd be very motivated to work on it.

  3. juliasilge commented on Oct 6, 2025

    @juliasilge
    MemberAuthor

    Another example of someone having trouble with how we have set this up in #9794

  4. jennybc commented on Oct 6, 2025

    @jennybc
    Member

    I'm not sure that #9794 is this, but it could have some connection.

  5. jennybc commented on Oct 8, 2025

    @jennybc
    Member

    My takeaway from #9794 is that the difference noticed by the user is probably that RStudio defaults to "just install from source", whereas pak does a build, then install. Therefore the pak workflow runs into https://bugs.r-project.org/show_bug.cgi?id=18186, i.e. the huge bummer that .Rbuildignore is enforced only after copying the entire source folder. This can cause pain when files that are huge or broken (e.g. broken symlink) are copied just so they can be later deleted.

    Also, the fact that pak installs from a temp directory is unfavorable for debugging and source refs.

    I predict something we'll look into and request when we tackle this is seeing if pak can change or offer more flexibility so we can keep using it but avoiding some of the current downsides. Because the way pak handles upgrading dependencies (or, rather, not necessarily upgrading) is a big win.

  6. juliasilge commented on Dec 4, 2025

    @juliasilge
    MemberAuthor

    We think we do really want to consider having a base R implementation, maybe the default even, maybe even no pak here for this particular use case.

  7. self-assigned this
    on Jan 16, 2026
  8. testlabauto commented on Jan 29, 2026

    @testlabauto
    Contributor

    Verified Fixed

    Positron Version(s) : 2026.02.0-139
    OS Version          : OSX
    

    Test scenario(s)

    Verified according to: #11431

    Link(s) to test cases run or created:

  9. locked as resolved and limited conversation to collaborators on Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions