From 174b66c41338dec0ef1091a59d16d58c305b4837 Mon Sep 17 00:00:00 2001 From: "Zhian N. Kamvar" Date: Tue, 24 Oct 2023 13:22:52 -0700 Subject: [PATCH 1/2] exclude lockfile packages from hydration --- R/utils-renv.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/R/utils-renv.R b/R/utils-renv.R index 627fbf67c..649d12f8e 100644 --- a/R/utils-renv.R +++ b/R/utils-renv.R @@ -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 From 1034d4d76d5ca2a0e9132ee49f66b97faf1d0449 Mon Sep 17 00:00:00 2001 From: "Zhian N. Kamvar" Date: Tue, 24 Oct 2023 13:33:46 -0700 Subject: [PATCH 2/2] bump to patch version --- NEWS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.md b/NEWS.md index 161b97c01..c934e7130 100644 --- a/NEWS.md +++ b/NEWS.md @@ -155,6 +155,12 @@ access top the lists of translated strings. These have replaced the `tr_()` strings at the point of generation. +## BUG FIX + +* `manage_deps()` can now provision a GitHub package from the lockfile if it was + not previously installed on the system (reported: @pratikunterwegs, + carpentries/actions#32; fixed: @zkamvar, #533) + # sandpaper 0.16.1 (2023-12-14) ## BUG FIX