Skip to content

Commit

Permalink
exclude lockfile packages from hydration
Browse files Browse the repository at this point in the history
  • Loading branch information
zkamvar authored and Bisaloo committed Jul 8, 2024
1 parent 82d0ee3 commit b7c03df
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/utils-renv.R
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ callr_manage_deps <- function(path, repos, snapshot, lockfile_exists) {
deps <- unique(renv::dependencies(path = path, root = path, dev = TRUE)$Package)
pkgs <- setdiff(deps, installed)
needs_hydration <- length(pkgs) > 0
if (packageVersion("renv") >= "1.0.0") {
# We only need to hydrate the packages that do not exist in the lockfile
# and that are not installed
lock <- renv::lockfile_read(renv_lock)
pkgs <- setdiff(pkgs, names(lock$Packages))
}
} else {
# If there is not a lockfile, we need to run a fully hydration
pkgs <- NULL
Expand Down

0 comments on commit b7c03df

Please sign in to comment.