Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the default behavior to RENV_PATHS_PREFIX_AUTO=TRUE #1211

Closed
colearendt opened this issue Apr 27, 2023 · 5 comments
Closed

Change the default behavior to RENV_PATHS_PREFIX_AUTO=TRUE #1211

colearendt opened this issue Apr 27, 2023 · 5 comments
Assignees
Labels
cache ⚾ feature a feature request or enhancement
Milestone

Comments

@colearendt
Copy link

By default, renv creates caches that are used (in an incompatible fashion) across differing linux OSes

By setting RENV_PATHS_PREFIX_AUTO=TRUE, this can be remedied for different linux operating systems. We should do this by default so that starting projects on different operating systems "just works" on renv (modulo package rebuilding).

There may be ways to mitigate a one-time breakage with existing project options, one-time symlinks, etc.

@kevinushey
Copy link
Collaborator

This would be worth including in a 1.0.0 release, since it'd be a potentially breaking change.

@kevinushey kevinushey added this to the 1.0.0 milestone Jun 9, 2023
@kevinushey kevinushey self-assigned this Jun 12, 2023
@kevinushey kevinushey modified the milestones: 1.0.0, 1.1.0 Jun 12, 2023
@kevinushey
Copy link
Collaborator

Punted due to time constraints + danger in making such a breaking change here.

@HenrikBengtsson
Copy link
Contributor

HenrikBengtsson commented Mar 1, 2024

Maybe you could synchronize a change to RENV_PATHS_PREFIX_AUTO=TRUE with the upcoming R 4.4.0 release (April/May 2024)? That's when people have to reinstall their packages anyway. You could stay backward compatible by only setting this default for R (>= 4.4), e.g.

.onLoad <- function(libname, pkgname) {
  if (getRversion() >= "4.4") {
    env <- Sys.getenv("RENV_PATHS_PREFIX_AUTO", NA_character_)
    if (is.na(env)) Sys.setenv(RENV_PATHS_PREFIX_AUTO = "TRUE")
  }
  ...
}

I guess you could roll that out already now.

@kevinushey
Copy link
Collaborator

@HenrikBengtsson that is an excellent idea -- I'll do that!

@kevinushey
Copy link
Collaborator

This has been implemented. Thanks again for the suggestion @HenrikBengtsson!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cache ⚾ feature a feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants