Skip to content

Improve visibility of CRAN repo settings when set outside of Global Options #13957

@kmasiello

Description

@kmasiello

Situation

A user wants to change their CRAN repo, and goes to Tools > Global Options > Packages. If there are any upstream .Renviron, .Rprofile, or Rprofile.site configurations setting the CRAN repo, a notification is on display on the Package Management tab stating "CRAN repositories modified outside package preferences." If the user makes a change within this settings dialog, the repository will not be respected because of the upstream configuration.

This message is confusing, does not provide the user with complete information, and users can still make modifications to their preferences though it will have no effect, leading to confusion.

Suggested Improvements

  1. Clarify message. Replace "CRAN repositories modified outside package preferences" with "CRAN repositories set as <rOptions.rCRANUrl> by <source>." This information is available here:
    LOG_INFO_MESSAGE("Set CRAN URL for session to '" + rOptions.rCRANUrl + "' (source: " +
  2. Prevent the user from making meaningless changes. If the RStudio preferences are being overridden by an upstream configuration, disable the input window for modifying the CRAN repo.
  3. Provide helpful information. If the user cannot change the settings using this window, tell them how they can change it. A pointer to a user-level or project-level .Renviron or .Rprofile would do the trick.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpackagesuser preferencesUser preferences, global options, environment variables, and other settings.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions