From 5716f17b75cb9927030d3062fe1f220bf55a3ab0 Mon Sep 17 00:00:00 2001 From: lorenzwalthert <10477073+lorenzwalthert@users.noreply.github.com> Date: Sun, 15 Sep 2024 08:55:01 +0000 Subject: [PATCH 1/4] Update renv dependencies --- renv.lock | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/renv.lock b/renv.lock index 5ddfb309d..888247773 100644 --- a/renv.lock +++ b/renv.lock @@ -4,7 +4,7 @@ "Repositories": [ { "Name": "RSPM", - "URL": "https://packagemanager.posit.co/cran/2024-07-29" + "URL": "https://packagemanager.posit.co/cran/2024-09-12" } ] }, @@ -144,13 +144,13 @@ }, "cpp11": { "Package": "cpp11", - "Version": "0.4.7", + "Version": "0.5.0", "Source": "Repository", "Repository": "RSPM", "Requirements": [ "R" ], - "Hash": "5a295d7d963cc5035284dcdbaf334f4e" + "Hash": "91570bba75d0c9d3f1040c835cee8fba" }, "crayon": { "Package": "crayon", @@ -193,14 +193,14 @@ }, "digest": { "Package": "digest", - "Version": "0.6.36", + "Version": "0.6.37", "Source": "Repository", "Repository": "RSPM", "Requirements": [ "R", "utils" ], - "Hash": "fd6824ad91ede64151e93af67df6376b" + "Hash": "33698c4b3127fc9f506654607fb73676" }, "docopt": { "Package": "docopt", @@ -268,7 +268,7 @@ }, "hunspell": { "Package": "hunspell", - "Version": "3.0.3", + "Version": "3.0.4", "Source": "Repository", "Repository": "RSPM", "Requirements": [ @@ -276,7 +276,7 @@ "Rcpp", "digest" ], - "Hash": "e957e989ea17f937964f0d46b0f0bca0" + "Hash": "f543163714aba1ff9e8cfe76d8d15381" }, "knitr": { "Package": "knitr", @@ -583,7 +583,7 @@ }, "withr": { "Package": "withr", - "Version": "3.0.0", + "Version": "3.0.1", "Source": "Repository", "Repository": "RSPM", "Requirements": [ @@ -591,19 +591,20 @@ "grDevices", "graphics" ], - "Hash": "d31b6c62c10dcf11ec530ca6b0dd5d35" + "Hash": "07909200e8bbe90426fbfeb73e1e27aa" }, "xfun": { "Package": "xfun", - "Version": "0.46", + "Version": "0.47", "Source": "Repository", "Repository": "RSPM", "Requirements": [ + "R", "grDevices", "stats", "tools" ], - "Hash": "00ce32f398db0415dde61abfef11300c" + "Hash": "36ab21660e2d095fef0d83f689e0477c" }, "xml2": { "Package": "xml2", From 5d444cf7d3295196933116cef32bfc09f00cc70c Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sun, 15 Sep 2024 16:43:08 +0200 Subject: [PATCH 2/4] re-include renv in packages to update (e.g. to fix https://github.com/rstudio/renv/issues/1869). Not sure why renv was excluded ever? --- inst/update-existing-hook-dependencies.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/update-existing-hook-dependencies.R b/inst/update-existing-hook-dependencies.R index 9be3c4f4e..adb51a952 100644 --- a/inst/update-existing-hook-dependencies.R +++ b/inst/update-existing-hook-dependencies.R @@ -3,5 +3,5 @@ renv_deps <- names(jsonlite::read_json("renv.lock")$Packages) source("renv/activate.R") renv::load() renv::restore(prompt = FALSE) -can_be_updated <- renv::update(setdiff(renv_deps, "renv"), prompt = FALSE, check = FALSE) +can_be_updated <- renv::update(renv_deps, prompt = FALSE, check = FALSE) renv::snapshot(packages = renv_deps, prompt = FALSE) From bb2a54b1bf52d0f77b415070112bcad72e210b98 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sun, 15 Sep 2024 17:05:18 +0200 Subject: [PATCH 3/4] seems like recorded packages are not installed if renv version changes --- inst/update-dependency-graph-existing-packages.R | 1 + 1 file changed, 1 insertion(+) diff --git a/inst/update-dependency-graph-existing-packages.R b/inst/update-dependency-graph-existing-packages.R index a18bc8e63..5929895b1 100644 --- a/inst/update-dependency-graph-existing-packages.R +++ b/inst/update-dependency-graph-existing-packages.R @@ -15,6 +15,7 @@ hook_deps <- function(root) { source("inst/update-renv-prepare.R") source("renv/activate.R") +renv::install() options(renv.snapshot.filter = hook_deps) renv::snapshot(type = "custom", prompt = FALSE) From 5fd0f126570e2abe363252b750093b84eb53b936 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sun, 15 Sep 2024 19:51:46 +0200 Subject: [PATCH 4/4] use the lockfile --- inst/update-dependency-graph-existing-packages.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/update-dependency-graph-existing-packages.R b/inst/update-dependency-graph-existing-packages.R index 5929895b1..4a965fb92 100644 --- a/inst/update-dependency-graph-existing-packages.R +++ b/inst/update-dependency-graph-existing-packages.R @@ -15,7 +15,7 @@ hook_deps <- function(root) { source("inst/update-renv-prepare.R") source("renv/activate.R") -renv::install() +renv::restore() options(renv.snapshot.filter = hook_deps) renv::snapshot(type = "custom", prompt = FALSE)