Skip to content

Conversation

@atheriel
Copy link
Contributor

@atheriel atheriel commented Dec 5, 2025

This commit adds a .ps.setPPMRepo() built-in that works the same way as the existing CLI option, but allows the repo to be set at runtime.

It is intended to support making the positron.r.packageManagerRepository setting apply without needing to restart/recreate existing R sessions.

Part of posit-dev/positron#10965.

This commit adds a `.ps.setPPMRepo()` built-in that works the same way
as the existing CLI option, but allows the repo to be set at runtime.

It is intended to support making the
`positron.r.packageManagerRepository` setting apply without needing to
restart/recreate existing R sessions.

Part of posit-dev/positron#10965.

Signed-off-by: Aaron Jacobs <aaron.jacobs@posit.co>
Copy link
Contributor

@lionel- lionel- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

#' @return `NULL`, invisibly.
#'
#' @export
.ps.setPPMRepo <- function(url) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.ps.setPPMRepo <- function(url) {
.ps.set_ppm_repo <- function(url) {

Comment on lines +65 to +66
if (isTRUE(attr(repos, "IDE"))) {
repos[["CRAN"]] <- url
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Maybe add that updating logic to apply_repo_defaults()? E.g. we update CRAN if set to "@CRAN@" or if the IDE attribute is set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants