From e8a8582d145f67ecb56caeb729bd9152b478e69b Mon Sep 17 00:00:00 2001 From: Aron Atkins Date: Mon, 8 Nov 2021 08:54:07 -0500 Subject: [PATCH] let packrat use renv for dependency analysis requires https://github.com/rstudio/packrat/pull/647 --- R/bundle.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/bundle.R b/R/bundle.R index 35a0711f..06019561 100644 --- a/R/bundle.R +++ b/R/bundle.R @@ -1130,6 +1130,10 @@ performPackratSnapshot <- function(bundleDir, verbose = FALSE) { on.exit(packrat::opts$snapshot.recommended.packages(srp, persist = FALSE), add = TRUE) + # use renv dependency scanning within packrat. + old <- options("packrat.dependency.discovery.renv" = TRUE) + on.exit(options(old), add = TRUE) + # attempt to eagerly load the BiocInstaller or BiocManaager package if installed, to work around # an issue where attempts to load the package could fail within a 'suppressMessages()' context packages <- c("BiocManager", "BiocInstaller")