diff --git a/.github/workflows/hook-dependencies-update.yml b/.github/workflows/hook-dependencies-update.yml index 0fcb8cf29..fe15ea385 100644 --- a/.github/workflows/hook-dependencies-update.yml +++ b/.github/workflows/hook-dependencies-update.yml @@ -33,8 +33,8 @@ jobs: Rscript -e "install.packages('remotes'); remotes::install_github('r-hub/sysreqs')" sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))") sudo -s eval "$sysreqs" - - name: install renv - run: Rscript -e "install.packages('renv')" + - name: install runtime dependencies + run: Rscript -e "install.packages(c('renv', 'jsonlite'))" - name: update PPM URL run: Rscript inst/update-ppm-url.R - name: update dependency graph among packages diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d437ab5c3..5a533ab9b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -83,7 +83,7 @@ repos: (?x)^( inst/hooks/exported/pkgdown.R| tests/testthat/in/.*| - inst/renv-update\.R| + inst/update-renv-prepare.R| inst/update-ppm-url.R| inst/update-dependency-graph-existing-packages\.R| inst/update-existing-hook-dependencies\.R| diff --git a/inst/update-dependency-graph-existing-packages.R b/inst/update-dependency-graph-existing-packages.R index 5ded0a13c..d63781cab 100644 --- a/inst/update-dependency-graph-existing-packages.R +++ b/inst/update-dependency-graph-existing-packages.R @@ -1,5 +1,3 @@ -source("renv/activate.R") - hook_deps <- function(root) { out <- renv::dependencies("inst/hooks/exported/")$Package desc <- desc::desc() @@ -14,14 +12,9 @@ hook_deps <- function(root) { out <- names(renv:::renv_package_dependencies(out)) return(sort(out)) } -options( - # repos = c( - # RSPM = "https://packagemanager.rstudio.com/all/latest", - # CRAN = "https://cran.rstudio.com" - # ), - install.packages.compile.from.source = "never" -) +source("inst/update-renv-prepare.R") +source("renv/activate.R") options(renv.snapshot.filter = hook_deps) renv::snapshot(type = "custom", prompt = FALSE) diff --git a/inst/update-existing-hook-dependencies.R b/inst/update-existing-hook-dependencies.R index 4614e0da6..9be3c4f4e 100644 --- a/inst/update-existing-hook-dependencies.R +++ b/inst/update-existing-hook-dependencies.R @@ -1,12 +1,6 @@ -source("renv/activate.R") - -options( - repos = c(RSPM = renv::lockfile_read()$R$Repositories$RSPM), # CRAN is not an option, always use PPM - install.packages.check.source = "no", # don't check if source packages are available - install.packages.compile.from.source = "never" # probably redundant with the above 'no': If source package is available, only use source if no code needs to be compiled (needs compilation flag on CRAN). -) -renv::install("jsonlite") +source("inst/update-renv-prepare.R") 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) diff --git a/inst/update-renv-prepare.R b/inst/update-renv-prepare.R new file mode 100644 index 000000000..26374e941 --- /dev/null +++ b/inst/update-renv-prepare.R @@ -0,0 +1,4 @@ +options( + install.packages.check.source = "no", # don't check if source packages are available + install.packages.compile.from.source = "never" # probably redundant with the above 'no': If source package is available, only use source if no code needs to be compiled (needs compilation flag on CRAN). +) diff --git a/renv.lock b/renv.lock index 282120109..e0a5c693e 100644 --- a/renv.lock +++ b/renv.lock @@ -4,11 +4,7 @@ "Repositories": [ { "Name": "RSPM", - "URL": "https://packagemanager.posit.co/cran/2023-11-17" - }, - { - "Name": "CRAN", - "URL": "https://cran.rstudio.com" + "URL": "https://packagemanager.posit.co/cran/2024-01-08" } ] }, @@ -54,7 +50,7 @@ }, "R.utils": { "Package": "R.utils", - "Version": "2.12.2", + "Version": "2.12.3", "Source": "Repository", "Repository": "RSPM", "Requirements": [ @@ -65,7 +61,7 @@ "tools", "utils" ], - "Hash": "325f01db13da12c04d8f6e7be36ff514" + "Hash": "3dc2829b790254bfba21e60965787651" }, "R6": { "Package": "R6", @@ -100,10 +96,10 @@ }, "brew": { "Package": "brew", - "Version": "1.0-8", + "Version": "1.0-10", "Source": "Repository", "Repository": "RSPM", - "Hash": "d69a786e85775b126bddbee185ae6084" + "Hash": "8f4a384e19dccd8c65356dc096847b76" }, "callr": { "Package": "callr", @@ -120,14 +116,14 @@ }, "cli": { "Package": "cli", - "Version": "3.6.1", + "Version": "3.6.2", "Source": "Repository", "Repository": "RSPM", "Requirements": [ "R", "utils" ], - "Hash": "89e6d8219950eac806ae0c489052048a" + "Hash": "1216ac65ac55ec0058a6f75d7ca0fd52" }, "codetools": { "Package": "codetools", @@ -148,13 +144,13 @@ }, "cpp11": { "Package": "cpp11", - "Version": "0.4.6", + "Version": "0.4.7", "Source": "Repository", "Repository": "RSPM", "Requirements": [ "R" ], - "Hash": "707fae4bbf73697ec8d85f9d7076c061" + "Hash": "5a295d7d963cc5035284dcdbaf334f4e" }, "crayon": { "Package": "crayon", @@ -184,17 +180,16 @@ }, "desc": { "Package": "desc", - "Version": "1.4.2", + "Version": "1.4.3", "Source": "Repository", "Repository": "RSPM", "Requirements": [ "R", "R6", "cli", - "rprojroot", "utils" ], - "Hash": "6b9602c7ebbe87101a9c8edb6e8b6d21" + "Hash": "99b79fcbd6c4d1ce087f5c5c758b384f" }, "digest": { "Package": "digest", @@ -355,7 +350,7 @@ }, "pkgbuild": { "Package": "pkgbuild", - "Version": "1.4.2", + "Version": "1.4.3", "Source": "Repository", "Repository": "RSPM", "Requirements": [ @@ -363,13 +358,10 @@ "R6", "callr", "cli", - "crayon", "desc", - "prettyunits", - "processx", - "rprojroot" + "processx" ], - "Hash": "beb25b32a957a22a5c301a9e441190b3" + "Hash": "c0143443203205e6a2760ce553dafc24" }, "pkgload": { "Package": "pkgload", @@ -392,19 +384,9 @@ ], "Hash": "903d68319ae9923fb2e2ee7fa8230b91" }, - "prettyunits": { - "Package": "prettyunits", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R" - ], - "Hash": "6b01fc98b1e86c4f705ce9dcfd2f57c7" - }, "processx": { "Package": "processx", - "Version": "3.8.2", + "Version": "3.8.3", "Source": "Repository", "Repository": "RSPM", "Requirements": [ @@ -413,7 +395,7 @@ "ps", "utils" ], - "Hash": "3efbd8ac1be0296a46c55387aeace0f3" + "Hash": "82d48b1aec56084d9438dbf98087a7e9" }, "ps": { "Package": "ps", @@ -527,7 +509,7 @@ }, "stringi": { "Package": "stringi", - "Version": "1.8.1", + "Version": "1.8.3", "Source": "Repository", "Repository": "RSPM", "Requirements": [ @@ -536,7 +518,7 @@ "tools", "utils" ], - "Hash": "12bf57fdcb9b7068bea39b32f87ecac9" + "Hash": "058aebddea264f4c99401515182e656a" }, "stringr": { "Package": "stringr", @@ -576,7 +558,7 @@ }, "vctrs": { "Package": "vctrs", - "Version": "0.6.4", + "Version": "0.6.5", "Source": "Repository", "Repository": "RSPM", "Requirements": [ @@ -586,7 +568,7 @@ "lifecycle", "rlang" ], - "Hash": "266c1ca411266ba8f365fcc726444b87" + "Hash": "c03fa420630029418f7e6da3667aac4a" }, "withr": { "Package": "withr", @@ -614,14 +596,16 @@ }, "xml2": { "Package": "xml2", - "Version": "1.3.5", + "Version": "1.3.6", "Source": "Repository", "Repository": "RSPM", "Requirements": [ "R", - "methods" + "cli", + "methods", + "rlang" ], - "Hash": "6c40e5cfcc6aefd88110666e18c31f40" + "Hash": "1d0336142f4cd25d8d23cd3ba7a8fb61" }, "xmlparsedata": { "Package": "xmlparsedata", @@ -635,10 +619,10 @@ }, "yaml": { "Package": "yaml", - "Version": "2.3.7", + "Version": "2.3.8", "Source": "Repository", "Repository": "RSPM", - "Hash": "0d0056cc5383fbc240ccd0cb584bf436" + "Hash": "29240487a071f535f5e5d5a323b7afbd" } } }