Skip to content

CRAN repository set by rig is to aggressive; overrides all RStudio settings #203

@jmcphers

Description

@jmcphers

When rig sets the CRAN repository, it does so by adding:

options(repos = c(CRAN = "https://cloud.r-project.org/"))

to library/base/R/Rprofile.

This setting is very aggressive; it cannot be disabled (not even by running with R --vanilla), and because it is set after R starts up, it overwrites RStudio's CRAN settings.

Using any rig version of R will cause warnings to appear in RStudio's Packages options, and the options that control CRAN repositories will not work with any rig version of R.

image

I would propose the following:

  1. Before setting the CRAN repository, check to see if it's set to something that appears intentional (e.g. not @CRAN@). If it appears to be intentionally set, leave it alone instead overwriting the user's preference.
  2. Move the CRAN repository setting from the base library Rprofile to a regular R startup script, such as Rprofile.site. When diagnosing where the CRAN repository is getting set, absolutely no one is going to think to check in the base library.
  3. Set an attribute on the options value to indicate rig as the origin of the setting.

See also: rstudio/rstudio#13957

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions