From c0edba1fcfffa1cabfdff4fc8f53bfbbf98c30a1 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Thu, 6 Jan 2022 13:50:31 +0100 Subject: [PATCH 01/13] ignore rbuildignore --- .Rbuildignore | 14 +++++++------- .pre-commit-config.yaml | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index 16ea4d4d6..294e1ff34 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,19 +1,19 @@ ^.*\.Rproj$ +^API$ +^CONTRIBUTING\.md$ +^LICENSE\.md$ +^README\.Rmd$ +^\.Rproj\.user$ ^\.github$ ^\.pre-commit-config\.yaml$ ^\.pre-commit-hooks\.yaml$ -^\.Rproj\.user$ -^API$ -^CONTRIBUTING\.md$ +^_pkgdown\.yml$ ^cran-comments\.md$ ^docs$ +^inst/WORDLIST$ ^inst/hooks/local$ ^inst/renv-update\.R$ -^inst/WORDLIST$ -^LICENSE\.md$ ^pkgdown$ -^_pkgdown\.yml$ -^README\.Rmd$ ^renv$ ^renv\.lock$ ^scratch$ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 81347da60..7ccf576ad 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -89,6 +89,8 @@ repos: - id: check-added-large-files - id: end-of-file-fixer exclude: '\.Rd' # sometimes roxygen fails to generate EOF blank line. + - id: file-contents-sorter + files: '^\.Rbuildignore$' - repo: https://github.com/lorenzwalthert/gitignore-tidy rev: 65851818058ac40fd8e9640b4dc026e8724c629f hooks: From a8c19e44c58c3277668713fc3a778e36f6004ee0 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Thu, 6 Jan 2022 13:52:13 +0100 Subject: [PATCH 02/13] add buildignore sorter --- NEWS.md | 2 ++ inst/pre-commit-config-pkg.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index eac8aa4f0..7b027e901 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # precommit 0.2.1.900* (Development version) +* The template `.pre-commit-config.yaml` does now include `file-contents-sorter` + to sort `.Rbuildignore` (#366). * Port codemeta hook to `language: r` (#350). * Don't include `R` as a dependency with `snippet_generate("additional-deps-roxygenize")` (#358). diff --git a/inst/pre-commit-config-pkg.yaml b/inst/pre-commit-config-pkg.yaml index 88968105d..5c1d9eab4 100644 --- a/inst/pre-commit-config-pkg.yaml +++ b/inst/pre-commit-config-pkg.yaml @@ -50,6 +50,8 @@ repos: hooks: - id: check-added-large-files args: ['--maxkb=200'] + - id: file-contents-sorter + files: '^\.Rbuildignore$' - id: end-of-file-fixer exclude: '\.Rd' - repo: local From c5e86c0ae7471395eec766d0ed50cf9c8bc91d80 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Thu, 6 Jan 2022 17:09:29 +0100 Subject: [PATCH 03/13] print statement on loading --- .github/workflows/hook-tests.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hook-tests.yaml b/.github/workflows/hook-tests.yaml index 00f8923f3..78ea1a196 100644 --- a/.github/workflows/hook-tests.yaml +++ b/.github/workflows/hook-tests.yaml @@ -71,9 +71,10 @@ jobs: # needed to make sure renv is activated in run_test() activate <- c( "if (nzchar(Sys.getenv('R_PRECOMMIT_HOOK_ENV')))", - paste0("renv::load('", getwd(), "')") + paste0("renv::load()"), + "print('R profile activated')" ) - writeLines(activate, '~/.Rprofile') + writeLines(activate, '.Rprofile') shell: Rscript {0} - name: Perpare testing environment run: | From 2eb9690c6e603091f16fcd9d17f7c9675fd1460f Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Thu, 6 Jan 2022 17:12:36 +0100 Subject: [PATCH 04/13] more ignore --- renv/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/renv/.gitignore b/renv/.gitignore index 212963117..cb0686430 100644 --- a/renv/.gitignore +++ b/renv/.gitignore @@ -1,3 +1,4 @@ +cellar/ library/ local/ lock/ From 6a2823a919ce0cbe826a7c7f6f5a76d8a3d1422a Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sun, 9 Jan 2022 15:14:22 +0100 Subject: [PATCH 05/13] upgrade to 0.15 --- renv/activate.R | 286 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 261 insertions(+), 25 deletions(-) diff --git a/renv/activate.R b/renv/activate.R index 65b09be52..226d6ccdb 100644 --- a/renv/activate.R +++ b/renv/activate.R @@ -2,35 +2,55 @@ local({ # the requested version of renv - version <- "0.14.0-37" + version <- "0.15.0" # the project directory project <- getwd() - # allow environment variable to control activation - activate <- Sys.getenv("RENV_AUTOLOADER_ENABLED") - if (!nzchar(activate)) - activate <- Sys.getenv("RENV_ACTIVATE_PROJECT") + # figure out path to 'renv' folder from this script + call <- sys.call(1L) + if (is.call(call) && identical(call[[1L]], as.symbol("source"))) + Sys.setenv(RENV_PATHS_RENV = dirname(call[[2L]])) - if (!nzchar(activate)) { + # figure out whether the autoloader is enabled + enabled <- local({ - # don't auto-activate when R CMD INSTALL is running - if (nzchar(Sys.getenv("R_INSTALL_PKG"))) - return(FALSE) + # first, check config option + override <- getOption("renv.config.autoloader.enabled") + if (!is.null(override)) + return(override) - } + # next, check environment variables + # TODO: prefer using the configuration one in the future + envvars <- c( + "RENV_CONFIG_AUTOLOADER_ENABLED", + "RENV_AUTOLOADER_ENABLED", + "RENV_ACTIVATE_PROJECT" + ) + + for (envvar in envvars) { + envval <- Sys.getenv(envvar, unset = NA) + if (!is.na(envval)) + return(tolower(envval) %in% c("true", "t", "1")) + } + + # enable by default + TRUE + + }) - # bail if activation was explicitly disabled - if (tolower(activate) %in% c("false", "f", "0")) + if (!enabled) return(FALSE) # avoid recursion - if (nzchar(Sys.getenv("RENV_R_INITIALIZING"))) + if (identical(getOption("renv.autoloader.running"), TRUE)) { + warning("ignoring recursive attempt to run renv autoloader") return(invisible(TRUE)) + } # signal that we're loading renv during R startup - Sys.setenv("RENV_R_INITIALIZING" = "true") - on.exit(Sys.unsetenv("RENV_R_INITIALIZING"), add = TRUE) + options(renv.autoloader.running = TRUE) + on.exit(options(renv.autoloader.running = NULL), add = TRUE) # signal that we've consented to use renv options(renv.consent = TRUE) @@ -54,6 +74,10 @@ local({ } # load bootstrap tools + `%||%` <- function(x, y) { + if (is.environment(x) || length(x)) x else y + } + bootstrap <- function(version, library) { # attempt to download renv @@ -79,6 +103,11 @@ local({ if (!is.na(repos)) return(repos) + # check for lockfile repositories + repos <- tryCatch(renv_bootstrap_repos_lockfile(), error = identity) + if (!inherits(repos, "error") && length(repos)) + return(repos) + # if we're testing, re-use the test repositories if (renv_bootstrap_tests_running()) return(getOption("renv.tests.repos")) @@ -103,6 +132,30 @@ local({ } + renv_bootstrap_repos_lockfile <- function() { + + lockpath <- Sys.getenv("RENV_PATHS_LOCKFILE", unset = "renv.lock") + if (!file.exists(lockpath)) + return(NULL) + + lockfile <- tryCatch(renv_json_read(lockpath), error = identity) + if (inherits(lockfile, "error")) { + warning(lockfile) + return(NULL) + } + + repos <- lockfile$R$Repositories + if (length(repos) == 0) + return(NULL) + + keys <- vapply(repos, `[[`, "Name", FUN.VALUE = character(1)) + vals <- vapply(repos, `[[`, "URL", FUN.VALUE = character(1)) + names(vals) <- keys + + return(vals) + + } + renv_bootstrap_download <- function(version) { # if the renv version number has 4 components, assume it must @@ -309,7 +362,7 @@ local({ bin <- R.home("bin") exe <- if (Sys.info()[["sysname"]] == "Windows") "R.exe" else "R" r <- file.path(bin, exe) - args <- c("--vanilla", "CMD", "INSTALL", "-l", shQuote(library), shQuote(tarball)) + args <- c("--vanilla", "CMD", "INSTALL", "--no-multiarch", "-l", shQuote(library), shQuote(tarball)) output <- system2(r, args, stdout = TRUE, stderr = TRUE) message("Done!") @@ -502,18 +555,33 @@ local({ renv_bootstrap_library_root <- function(project) { + prefix <- renv_bootstrap_profile_prefix() + path <- Sys.getenv("RENV_PATHS_LIBRARY", unset = NA) if (!is.na(path)) - return(path) + return(paste(c(path, prefix), collapse = "/")) - path <- Sys.getenv("RENV_PATHS_LIBRARY_ROOT", unset = NA) - if (!is.na(path)) { + path <- renv_bootstrap_library_root_impl(project) + if (!is.null(path)) { name <- renv_bootstrap_library_root_name(project) - return(file.path(path, name)) + return(paste(c(path, prefix, name), collapse = "/")) } - prefix <- renv_bootstrap_profile_prefix() - paste(c(project, prefix, "renv/library"), collapse = "/") + renv_bootstrap_paths_renv("library", project = project) + + } + + renv_bootstrap_library_root_impl <- function(project) { + + root <- Sys.getenv("RENV_PATHS_LIBRARY_ROOT", unset = NA) + if (!is.na(root)) + return(root) + + type <- renv_bootstrap_project_type(project) + if (identical(type, "package")) { + userdir <- renv_bootstrap_user_dir() + return(file.path(userdir, "library")) + } } @@ -579,7 +647,7 @@ local({ return(profile) # check for a profile file (nothing to do if it doesn't exist) - path <- file.path(project, "renv/local/profile") + path <- renv_bootstrap_paths_renv("profile", profile = FALSE) if (!file.exists(path)) return(NULL) @@ -590,7 +658,7 @@ local({ # set RENV_PROFILE profile <- contents[[1L]] - if (nzchar(profile)) + if (!profile %in% c("", "default")) Sys.setenv(RENV_PROFILE = profile) profile @@ -600,7 +668,7 @@ local({ renv_bootstrap_profile_prefix <- function() { profile <- renv_bootstrap_profile_get() if (!is.null(profile)) - return(file.path("renv/profiles", profile)) + return(file.path("profiles", profile, "renv")) } renv_bootstrap_profile_get <- function() { @@ -624,6 +692,174 @@ local({ profile } + + renv_bootstrap_path_absolute <- function(path) { + + substr(path, 1L, 1L) %in% c("~", "/", "\\") || ( + substr(path, 1L, 1L) %in% c(letters, LETTERS) && + substr(path, 2L, 3L) %in% c(":/", ":\\") + ) + + } + + renv_bootstrap_paths_renv <- function(..., profile = TRUE, project = NULL) { + renv <- Sys.getenv("RENV_PATHS_RENV", unset = "renv") + root <- if (renv_bootstrap_path_absolute(renv)) NULL else project + prefix <- if (profile) renv_bootstrap_profile_prefix() + components <- c(root, renv, prefix, ...) + paste(components, collapse = "/") + } + + renv_bootstrap_project_type <- function(path) { + + descpath <- file.path(path, "DESCRIPTION") + if (!file.exists(descpath)) + return("unknown") + + desc <- tryCatch( + read.dcf(descpath, all = TRUE), + error = identity + ) + + if (inherits(desc, "error")) + return("unknown") + + type <- desc$Type + if (!is.null(type)) + return(tolower(type)) + + package <- desc$Package + if (!is.null(package)) + return("package") + + "unknown" + + } + + renv_bootstrap_user_dir <- function(path) { + dir <- renv_bootstrap_user_dir_impl(path) + chartr("\\", "/", dir) + } + + renv_bootstrap_user_dir_impl <- function(path) { + + # use R_user_dir if available + tools <- asNamespace("tools") + if (is.function(tools$R_user_dir)) + return(tools$R_user_dir("renv", "cache")) + + # try using our own backfill for older versions of R + envvars <- c("R_USER_CACHE_DIR", "XDG_CACHE_HOME") + for (envvar in envvars) { + root <- Sys.getenv(envvar, unset = NA) + if (!is.na(root)) { + path <- file.path(root, "R/renv") + return(path) + } + } + + # use platform-specific default fallbacks + if (Sys.info()[["sysname"]] == "Windows") + file.path(Sys.getenv("LOCALAPPDATA"), "R/cache/R/renv") + else if (Sys.info()[["sysname"]] == "Darwin") + "~/Library/Caches/org.R-project.R/R/renv" + else + "~/.cache/R/renv" + + } + + renv_json_read <- function(file = NULL, text = NULL) { + + text <- paste(text %||% read(file), collapse = "\n") + + # find strings in the JSON + pattern <- '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + locs <- gregexpr(pattern, text)[[1]] + + # if any are found, replace them with placeholders + replaced <- text + strings <- character() + replacements <- character() + + if (!identical(c(locs), -1L)) { + + # get the string values + starts <- locs + ends <- locs + attr(locs, "match.length") - 1L + strings <- substring(text, starts, ends) + + # only keep those requiring escaping + strings <- grep("[[\\]{}:]", strings, perl = TRUE, value = TRUE) + + # compute replacements + replacements <- sprintf('"\032%i\032"', seq_along(strings)) + + # replace the strings + mapply(function(string, replacement) { + replaced <<- sub(string, replacement, replaced, fixed = TRUE) + }, strings, replacements) + + } + + # transform the JSON into something the R parser understands + transformed <- replaced + transformed <- gsub("[[{]", "list(", transformed) + transformed <- gsub("[]}]", ")", transformed) + transformed <- gsub(":", "=", transformed, fixed = TRUE) + text <- paste(transformed, collapse = "\n") + + # parse it + json <- parse(text = text, keep.source = FALSE, srcfile = NULL)[[1L]] + + # construct map between source strings, replaced strings + map <- as.character(parse(text = strings)) + names(map) <- as.character(parse(text = replacements)) + + # convert to list + map <- as.list(map) + + # remap strings in object + remapped <- renv_json_remap(json, map) + + # evaluate + eval(remapped, envir = baseenv()) + + } + + renv_json_remap <- function(json, map) { + + # fix names + if (!is.null(names(json))) { + lhs <- match(names(json), names(map), nomatch = 0L) + rhs <- match(names(map), names(json), nomatch = 0L) + names(json)[rhs] <- map[lhs] + } + + # fix values + if (is.character(json)) + return(map[[json]] %||% json) + + # handle true, false, null + if (is.name(json)) { + text <- as.character(json) + if (text == "true") + return(TRUE) + else if (text == "false") + return(FALSE) + else if (text == "null") + return(NULL) + } + + # recurse + if (is.recursive(json)) { + for (i in seq_along(json)) { + json[i] <- list(renv_json_remap(json[[i]], map)) + } + } + + json + + } # load the renv profile, if any renv_bootstrap_profile_load(project) From 0fdaedbb6ccf3b6331f1ee41b502753a67556899 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sun, 9 Jan 2022 15:33:49 +0100 Subject: [PATCH 06/13] switch to CRAN renv --- renv.lock | 183 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 117 insertions(+), 66 deletions(-) diff --git a/renv.lock b/renv.lock index 86a26e294..5260d1fa0 100644 --- a/renv.lock +++ b/renv.lock @@ -14,210 +14,240 @@ "Version": "0.15.0", "Source": "Repository", "Repository": "RSPM", - "Hash": "e92a8ea8388c47c82ed8aa435ed3be50" + "Hash": "e92a8ea8388c47c82ed8aa435ed3be50", + "Requirements": [] }, "R.methodsS3": { "Package": "R.methodsS3", "Version": "1.8.1", "Source": "Repository", "Repository": "RSPM", - "Hash": "4bf6453323755202d5909697b6f7c109" + "Hash": "4bf6453323755202d5909697b6f7c109", + "Requirements": [] }, "R.oo": { "Package": "R.oo", "Version": "1.24.0", "Source": "Repository", "Repository": "RSPM", - "Hash": "5709328352717e2f0a9c012be8a97554" + "Hash": "5709328352717e2f0a9c012be8a97554", + "Requirements": [] }, "R.utils": { "Package": "R.utils", "Version": "2.11.0", "Source": "Repository", "Repository": "RSPM", - "Hash": "a7ecb8e60815c7a18648e84cd121b23a" + "Hash": "a7ecb8e60815c7a18648e84cd121b23a", + "Requirements": [] }, "R6": { "Package": "R6", "Version": "2.5.1", "Source": "Repository", "Repository": "RSPM", - "Hash": "470851b6d5d0ac559e9d01bb352b4021" + "Hash": "470851b6d5d0ac559e9d01bb352b4021", + "Requirements": [] }, "Rcpp": { "Package": "Rcpp", "Version": "1.0.7", "Source": "Repository", "Repository": "RSPM", - "Hash": "dab19adae4440ae55aa8a9d238b246bb" + "Hash": "dab19adae4440ae55aa8a9d238b246bb", + "Requirements": [] }, "brew": { "Package": "brew", "Version": "1.0-6", "Source": "Repository", "Repository": "RSPM", - "Hash": "92a5f887f9ae3035ac7afde22ba73ee9" + "Hash": "92a5f887f9ae3035ac7afde22ba73ee9", + "Requirements": [] }, "callr": { "Package": "callr", "Version": "3.7.0", "Source": "Repository", "Repository": "RSPM", - "Hash": "461aa75a11ce2400245190ef5d3995df" + "Hash": "461aa75a11ce2400245190ef5d3995df", + "Requirements": [] }, "cli": { "Package": "cli", "Version": "3.1.0", "Source": "Repository", "Repository": "RSPM", - "Hash": "66a3834e54593c89d8beefb312347e58" + "Hash": "66a3834e54593c89d8beefb312347e58", + "Requirements": [] }, "codetools": { "Package": "codetools", "Version": "0.2-18", "Source": "Repository", "Repository": "RSPM", - "Hash": "019388fc48e48b3da0d3a76ff94608a8" + "Hash": "019388fc48e48b3da0d3a76ff94608a8", + "Requirements": [] }, "commonmark": { "Package": "commonmark", "Version": "1.7", "Source": "Repository", "Repository": "RSPM", - "Hash": "0f22be39ec1d141fd03683c06f3a6e67" + "Hash": "0f22be39ec1d141fd03683c06f3a6e67", + "Requirements": [] }, "cpp11": { "Package": "cpp11", "Version": "0.4.2", "Source": "Repository", "Repository": "RSPM", - "Hash": "fa53ce256cd280f468c080a58ea5ba8c" + "Hash": "fa53ce256cd280f468c080a58ea5ba8c", + "Requirements": [] }, "crayon": { "Package": "crayon", "Version": "1.4.2", "Source": "Repository", "Repository": "RSPM", - "Hash": "0a6a65d92bd45b47b94b84244b528d17" + "Hash": "0a6a65d92bd45b47b94b84244b528d17", + "Requirements": [] }, "cyclocomp": { "Package": "cyclocomp", "Version": "1.1.0", "Source": "Repository", "Repository": "RSPM", - "Hash": "53cbed70a2f7472d48fb6aef08442f25" + "Hash": "53cbed70a2f7472d48fb6aef08442f25", + "Requirements": [] }, "desc": { "Package": "desc", "Version": "1.4.0", "Source": "Repository", "Repository": "RSPM", - "Hash": "28763d08fadd0b733e3cee9dab4e12fe" + "Hash": "28763d08fadd0b733e3cee9dab4e12fe", + "Requirements": [] }, "digest": { "Package": "digest", "Version": "0.6.29", "Source": "Repository", "Repository": "RSPM", - "Hash": "cf6b206a045a684728c3267ef7596190" + "Hash": "cf6b206a045a684728c3267ef7596190", + "Requirements": [] }, "docopt": { "Package": "docopt", "Version": "0.7.1", "Source": "Repository", "Repository": "RSPM", - "Hash": "e9eeef7931ee99ca0093f3f20b88e09b" + "Hash": "e9eeef7931ee99ca0093f3f20b88e09b", + "Requirements": [] }, "ellipsis": { "Package": "ellipsis", "Version": "0.3.2", "Source": "Repository", "Repository": "RSPM", - "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" + "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077", + "Requirements": [] }, "evaluate": { "Package": "evaluate", "Version": "0.14", "Source": "Repository", "Repository": "RSPM", - "Hash": "ec8ca05cffcc70569eaaad8469d2a3a7" + "Hash": "ec8ca05cffcc70569eaaad8469d2a3a7", + "Requirements": [] }, "fansi": { "Package": "fansi", "Version": "0.5.0", "Source": "Repository", "Repository": "RSPM", - "Hash": "d447b40982c576a72b779f0a3b3da227" + "Hash": "d447b40982c576a72b779f0a3b3da227", + "Requirements": [] }, "fs": { "Package": "fs", "Version": "1.5.2", "Source": "Repository", "Repository": "RSPM", - "Hash": "7c89603d81793f0d5486d91ab1fc6f1d" + "Hash": "7c89603d81793f0d5486d91ab1fc6f1d", + "Requirements": [] }, "git2r": { "Package": "git2r", "Version": "0.29.0", "Source": "Repository", "Repository": "RSPM", - "Hash": "b114135c4749076bd5ef74a5827b6f62" + "Hash": "b114135c4749076bd5ef74a5827b6f62", + "Requirements": [] }, "glue": { "Package": "glue", "Version": "1.5.1", "Source": "Repository", "Repository": "RSPM", - "Hash": "e01bc1fe0c20954ec97eac86640abc70" + "Hash": "e01bc1fe0c20954ec97eac86640abc70", + "Requirements": [] }, "here": { "Package": "here", "Version": "1.0.1", "Source": "Repository", "Repository": "RSPM", - "Hash": "24b224366f9c2e7534d2344d10d59211" + "Hash": "24b224366f9c2e7534d2344d10d59211", + "Requirements": [] }, "highr": { "Package": "highr", "Version": "0.9", "Source": "Repository", "Repository": "RSPM", - "Hash": "8eb36c8125038e648e5d111c0d7b2ed4" + "Hash": "8eb36c8125038e648e5d111c0d7b2ed4", + "Requirements": [] }, "hunspell": { "Package": "hunspell", "Version": "3.0.1", "Source": "Repository", "Repository": "RSPM", - "Hash": "3987784c19192ad0f2261c456d936df1" + "Hash": "3987784c19192ad0f2261c456d936df1", + "Requirements": [] }, "jsonlite": { "Package": "jsonlite", "Version": "1.7.2", "Source": "Repository", "Repository": "RSPM", - "Hash": "98138e0994d41508c7a6b84a0600cfcb" + "Hash": "98138e0994d41508c7a6b84a0600cfcb", + "Requirements": [] }, "knitr": { "Package": "knitr", "Version": "1.36", "Source": "Repository", "Repository": "RSPM", - "Hash": "46344b93f8854714cdf476433a59ed10" + "Hash": "46344b93f8854714cdf476433a59ed10", + "Requirements": [] }, "lazyeval": { "Package": "lazyeval", "Version": "0.2.2", "Source": "Repository", "Repository": "RSPM", - "Hash": "d908914ae53b04d4c0c0fd72ecc35370" + "Hash": "d908914ae53b04d4c0c0fd72ecc35370", + "Requirements": [] }, "lifecycle": { "Package": "lifecycle", "Version": "1.0.1", "Source": "Repository", "Repository": "RSPM", - "Hash": "a6b6d352e3ed897373ab19d8395c98d0" + "Hash": "a6b6d352e3ed897373ab19d8395c98d0", + "Requirements": [] }, "lintr": { "Package": "lintr", @@ -229,138 +259,150 @@ "RemoteUsername": "jimhester", "RemoteRef": "HEAD", "RemoteSha": "6e0d15257496421266f4f87700be16c8dd3f090b", - "Hash": "65e26f34f7b468358660522f48eee28a" + "Hash": "65e26f34f7b468358660522f48eee28a", + "Requirements": [] }, "magrittr": { "Package": "magrittr", "Version": "2.0.1", "Source": "Repository", "Repository": "RSPM", - "Hash": "41287f1ac7d28a92f0a286ed507928d3" + "Hash": "41287f1ac7d28a92f0a286ed507928d3", + "Requirements": [] }, "pillar": { "Package": "pillar", "Version": "1.6.4", "Source": "Repository", "Repository": "RSPM", - "Hash": "60200b6aa32314ac457d3efbb5ccbd98" + "Hash": "60200b6aa32314ac457d3efbb5ccbd98", + "Requirements": [] }, "pkgconfig": { "Package": "pkgconfig", "Version": "2.0.3", "Source": "Repository", "Repository": "RSPM", - "Hash": "01f28d4278f15c76cddbea05899c5d6f" + "Hash": "01f28d4278f15c76cddbea05899c5d6f", + "Requirements": [] }, "pkgload": { "Package": "pkgload", "Version": "1.2.4", "Source": "Repository", "Repository": "RSPM", - "Hash": "7533cd805940821bf23eaf3c8d4c1735" + "Hash": "7533cd805940821bf23eaf3c8d4c1735", + "Requirements": [] }, "processx": { "Package": "processx", "Version": "3.5.2", "Source": "Repository", "Repository": "RSPM", - "Hash": "0cbca2bc4d16525d009c4dbba156b37c" + "Hash": "0cbca2bc4d16525d009c4dbba156b37c", + "Requirements": [] }, "ps": { "Package": "ps", "Version": "1.6.0", "Source": "Repository", "Repository": "RSPM", - "Hash": "32620e2001c1dce1af49c49dccbb9420" + "Hash": "32620e2001c1dce1af49c49dccbb9420", + "Requirements": [] }, "purrr": { "Package": "purrr", "Version": "0.3.4", "Source": "Repository", "Repository": "RSPM", - "Hash": "97def703420c8ab10d8f0e6c72101e02" + "Hash": "97def703420c8ab10d8f0e6c72101e02", + "Requirements": [] }, "rematch2": { "Package": "rematch2", "Version": "2.1.2", "Source": "Repository", "Repository": "RSPM", - "Hash": "76c9e04c712a05848ae7a23d2f170a40" + "Hash": "76c9e04c712a05848ae7a23d2f170a40", + "Requirements": [] }, "remotes": { "Package": "remotes", "Version": "2.4.2", "Source": "Repository", "Repository": "RSPM", - "Hash": "227045be9aee47e6dda9bb38ac870d67" + "Hash": "227045be9aee47e6dda9bb38ac870d67", + "Requirements": [] }, "renv": { "Package": "renv", - "Version": "0.14.0-37", - "Source": "GitHub", - "RemoteType": "github", - "RemoteUsername": "lorenzwalthert", - "RemoteRepo": "renv", - "RemoteRef": "issue-837", - "RemoteSha": "16361211dee23cefb29d06daabfd84a0ac59b1bf", - "RemoteHost": "api.github.com", - "Hash": "31d881bccbcdab88396fc9fca19a5058" + "Version": "0.15.0", + "Source": "Repository", + "Requirements": [] }, "rex": { "Package": "rex", "Version": "1.2.1", "Source": "Repository", "Repository": "RSPM", - "Hash": "ae34cd56890607370665bee5bd17812f" + "Hash": "ae34cd56890607370665bee5bd17812f", + "Requirements": [] }, "rlang": { "Package": "rlang", "Version": "0.4.12", "Source": "Repository", "Repository": "RSPM", - "Hash": "0879f5388fe6e4d56d7ef0b7ccb031e5" + "Hash": "0879f5388fe6e4d56d7ef0b7ccb031e5", + "Requirements": [] }, "roxygen2": { "Package": "roxygen2", "Version": "7.1.2", "Source": "Repository", "Repository": "RSPM", - "Hash": "eb9849556c4250305106e82edae35b72" + "Hash": "eb9849556c4250305106e82edae35b72", + "Requirements": [] }, "rprojroot": { "Package": "rprojroot", "Version": "2.0.2", "Source": "Repository", "Repository": "RSPM", - "Hash": "249d8cd1e74a8f6a26194a91b47f21d1" + "Hash": "249d8cd1e74a8f6a26194a91b47f21d1", + "Requirements": [] }, "rstudioapi": { "Package": "rstudioapi", "Version": "0.13", "Source": "Repository", "Repository": "RSPM", - "Hash": "06c85365a03fdaf699966cc1d3cf53ea" + "Hash": "06c85365a03fdaf699966cc1d3cf53ea", + "Requirements": [] }, "spelling": { "Package": "spelling", "Version": "2.2", "Source": "Repository", "Repository": "RSPM", - "Hash": "b8c899a5c83f0d897286550481c91798" + "Hash": "b8c899a5c83f0d897286550481c91798", + "Requirements": [] }, "stringi": { "Package": "stringi", "Version": "1.7.6", "Source": "Repository", "Repository": "RSPM", - "Hash": "bba431031d30789535745a9627ac9271" + "Hash": "bba431031d30789535745a9627ac9271", + "Requirements": [] }, "stringr": { "Package": "stringr", "Version": "1.4.0", "Source": "Repository", "Repository": "RSPM", - "Hash": "0759e6b6c0957edb1311028a49a35e76" + "Hash": "0759e6b6c0957edb1311028a49a35e76", + "Requirements": [] }, "styler": { "Package": "styler", @@ -372,63 +414,72 @@ "RemoteRef": "HEAD", "RemoteSha": "5516800898656c145c41a8ff3e917ac36fdf86c6", "RemoteHost": "api.github.com", - "Hash": "0c10899c9ca753f51f044298ef2841ca" + "Hash": "0c10899c9ca753f51f044298ef2841ca", + "Requirements": [] }, "tibble": { "Package": "tibble", "Version": "3.1.6", "Source": "Repository", "Repository": "RSPM", - "Hash": "8a8f02d1934dfd6431c671361510dd0b" + "Hash": "8a8f02d1934dfd6431c671361510dd0b", + "Requirements": [] }, "utf8": { "Package": "utf8", "Version": "1.2.2", "Source": "Repository", "Repository": "RSPM", - "Hash": "c9c462b759a5cc844ae25b5942654d13" + "Hash": "c9c462b759a5cc844ae25b5942654d13", + "Requirements": [] }, "vctrs": { "Package": "vctrs", "Version": "0.3.8", "Source": "Repository", "Repository": "RSPM", - "Hash": "ecf749a1b39ea72bd9b51b76292261f1" + "Hash": "ecf749a1b39ea72bd9b51b76292261f1", + "Requirements": [] }, "withr": { "Package": "withr", "Version": "2.4.3", "Source": "Repository", "Repository": "RSPM", - "Hash": "a376b424c4817cda4920bbbeb3364e85" + "Hash": "a376b424c4817cda4920bbbeb3364e85", + "Requirements": [] }, "xfun": { "Package": "xfun", "Version": "0.28", "Source": "Repository", "Repository": "RSPM", - "Hash": "f7f3a61ab62cd046d307577a8ae12999" + "Hash": "f7f3a61ab62cd046d307577a8ae12999", + "Requirements": [] }, "xml2": { "Package": "xml2", "Version": "1.3.3", "Source": "Repository", "Repository": "RSPM", - "Hash": "40682ed6a969ea5abfd351eb67833adc" + "Hash": "40682ed6a969ea5abfd351eb67833adc", + "Requirements": [] }, "xmlparsedata": { "Package": "xmlparsedata", "Version": "1.0.5", "Source": "Repository", "Repository": "RSPM", - "Hash": "45e4bf3c46476896e821fc0a408fb4fc" + "Hash": "45e4bf3c46476896e821fc0a408fb4fc", + "Requirements": [] }, "yaml": { "Package": "yaml", "Version": "2.2.1", "Source": "Repository", "Repository": "RSPM", - "Hash": "2826c5d9efb0a88f657c7a679c7106db" + "Hash": "2826c5d9efb0a88f657c7a679c7106db", + "Requirements": [] } } } From ec4204a3ee6d5cacc89132529988e64c73237c26 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sun, 9 Jan 2022 15:48:36 +0100 Subject: [PATCH 07/13] use CRAN, not rspm --- .github/workflows/hook-dependencies-upate.yml | 5 +- renv.lock | 315 ++++++++++++------ 2 files changed, 221 insertions(+), 99 deletions(-) diff --git a/.github/workflows/hook-dependencies-upate.yml b/.github/workflows/hook-dependencies-upate.yml index 6bc85b172..69cd3ddb2 100644 --- a/.github/workflows/hook-dependencies-upate.yml +++ b/.github/workflows/hook-dependencies-upate.yml @@ -33,12 +33,13 @@ jobs: sudo -s eval "$sysreqs" - name: update existing packages run: | + options(repos = c(CRAN = "https://packagemanager.rstudio.com/all/latest")) install.packages('renv') install.packages('jsonlite') renv_deps <- names(jsonlite::read_json('renv.lock')$Packages) renv::load() renv::restore() - can_be_updated <- renv::update(renv_deps) + can_be_updated <- renv::update(renv_deps, prompt = FALSE) renv::snapshot(packages = renv_deps) shell: Rscript {0} - name: update dependency graph among packages @@ -58,7 +59,7 @@ jobs: out <- names(renv:::renv_package_dependencies(out)) return(out) } - + options(repos = c(CRAN = "https://packagemanager.rstudio.com/all/latest")) options(renv.snapshot.filter = hook_deps) renv::snapshot(type = "custom", prompt = FALSE) diff --git a/renv.lock b/renv.lock index 5260d1fa0..7cf63849b 100644 --- a/renv.lock +++ b/renv.lock @@ -3,7 +3,7 @@ "Version": "4.1.0", "Repositories": [ { - "Name": "RSPM", + "Name": "CRAN", "URL": "https://packagemanager.rstudio.com/all/latest" } ] @@ -13,15 +13,20 @@ "Package": "R.cache", "Version": "0.15.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "e92a8ea8388c47c82ed8aa435ed3be50", - "Requirements": [] + "Requirements": [ + "R.methodsS3", + "R.oo", + "R.utils", + "digest" + ] }, "R.methodsS3": { "Package": "R.methodsS3", "Version": "1.8.1", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "4bf6453323755202d5909697b6f7c109", "Requirements": [] }, @@ -29,23 +34,28 @@ "Package": "R.oo", "Version": "1.24.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "5709328352717e2f0a9c012be8a97554", - "Requirements": [] + "Requirements": [ + "R.methodsS3" + ] }, "R.utils": { "Package": "R.utils", "Version": "2.11.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "a7ecb8e60815c7a18648e84cd121b23a", - "Requirements": [] + "Requirements": [ + "R.methodsS3", + "R.oo" + ] }, "R6": { "Package": "R6", "Version": "2.5.1", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "470851b6d5d0ac559e9d01bb352b4021", "Requirements": [] }, @@ -53,7 +63,7 @@ "Package": "Rcpp", "Version": "1.0.7", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "dab19adae4440ae55aa8a9d238b246bb", "Requirements": [] }, @@ -61,7 +71,7 @@ "Package": "brew", "Version": "1.0-6", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "92a5f887f9ae3035ac7afde22ba73ee9", "Requirements": [] }, @@ -69,23 +79,28 @@ "Package": "callr", "Version": "3.7.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "461aa75a11ce2400245190ef5d3995df", - "Requirements": [] + "Requirements": [ + "R6", + "processx" + ] }, "cli": { "Package": "cli", "Version": "3.1.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "66a3834e54593c89d8beefb312347e58", - "Requirements": [] + "Requirements": [ + "glue" + ] }, "codetools": { "Package": "codetools", "Version": "0.2-18", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "019388fc48e48b3da0d3a76ff94608a8", "Requirements": [] }, @@ -93,7 +108,7 @@ "Package": "commonmark", "Version": "1.7", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "0f22be39ec1d141fd03683c06f3a6e67", "Requirements": [] }, @@ -101,7 +116,7 @@ "Package": "cpp11", "Version": "0.4.2", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "fa53ce256cd280f468c080a58ea5ba8c", "Requirements": [] }, @@ -109,7 +124,7 @@ "Package": "crayon", "Version": "1.4.2", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "0a6a65d92bd45b47b94b84244b528d17", "Requirements": [] }, @@ -117,23 +132,33 @@ "Package": "cyclocomp", "Version": "1.1.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "53cbed70a2f7472d48fb6aef08442f25", - "Requirements": [] + "Requirements": [ + "callr", + "crayon", + "desc", + "remotes", + "withr" + ] }, "desc": { "Package": "desc", "Version": "1.4.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "28763d08fadd0b733e3cee9dab4e12fe", - "Requirements": [] + "Requirements": [ + "R6", + "crayon", + "rprojroot" + ] }, "digest": { "Package": "digest", "Version": "0.6.29", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "cf6b206a045a684728c3267ef7596190", "Requirements": [] }, @@ -141,7 +166,7 @@ "Package": "docopt", "Version": "0.7.1", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "e9eeef7931ee99ca0093f3f20b88e09b", "Requirements": [] }, @@ -149,15 +174,17 @@ "Package": "ellipsis", "Version": "0.3.2", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077", - "Requirements": [] + "Requirements": [ + "rlang" + ] }, "evaluate": { "Package": "evaluate", "Version": "0.14", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "ec8ca05cffcc70569eaaad8469d2a3a7", "Requirements": [] }, @@ -165,7 +192,7 @@ "Package": "fansi", "Version": "0.5.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "d447b40982c576a72b779f0a3b3da227", "Requirements": [] }, @@ -173,7 +200,7 @@ "Package": "fs", "Version": "1.5.2", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "7c89603d81793f0d5486d91ab1fc6f1d", "Requirements": [] }, @@ -181,63 +208,76 @@ "Package": "git2r", "Version": "0.29.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "b114135c4749076bd5ef74a5827b6f62", "Requirements": [] }, "glue": { "Package": "glue", - "Version": "1.5.1", + "Version": "1.6.0", "Source": "Repository", - "Repository": "RSPM", - "Hash": "e01bc1fe0c20954ec97eac86640abc70", + "Repository": "CRAN", + "Hash": "b8bb7aaf248e45bac08ebed86f3a0aa4", "Requirements": [] }, "here": { "Package": "here", "Version": "1.0.1", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "24b224366f9c2e7534d2344d10d59211", - "Requirements": [] + "Requirements": [ + "rprojroot" + ] }, "highr": { "Package": "highr", "Version": "0.9", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "8eb36c8125038e648e5d111c0d7b2ed4", - "Requirements": [] + "Requirements": [ + "xfun" + ] }, "hunspell": { "Package": "hunspell", "Version": "3.0.1", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "3987784c19192ad0f2261c456d936df1", - "Requirements": [] + "Requirements": [ + "Rcpp", + "digest" + ] }, "jsonlite": { "Package": "jsonlite", "Version": "1.7.2", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "98138e0994d41508c7a6b84a0600cfcb", "Requirements": [] }, "knitr": { "Package": "knitr", - "Version": "1.36", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "46344b93f8854714cdf476433a59ed10", - "Requirements": [] + "Version": "1.37", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a4ec675eb332a33fe7b7fe26f70e1f98", + "Requirements": [ + "evaluate", + "highr", + "stringr", + "xfun", + "yaml" + ] }, "lazyeval": { "Package": "lazyeval", "Version": "0.2.2", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "d908914ae53b04d4c0c0fd72ecc35370", "Requirements": [] }, @@ -245,9 +285,12 @@ "Package": "lifecycle", "Version": "1.0.1", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "a6b6d352e3ed897373ab19d8395c98d0", - "Requirements": [] + "Requirements": [ + "glue", + "rlang" + ] }, "lintr": { "Package": "lintr", @@ -260,13 +303,23 @@ "RemoteRef": "HEAD", "RemoteSha": "6e0d15257496421266f4f87700be16c8dd3f090b", "Hash": "65e26f34f7b468358660522f48eee28a", - "Requirements": [] + "Requirements": [ + "codetools", + "crayon", + "cyclocomp", + "digest", + "jsonlite", + "knitr", + "rex", + "xml2", + "xmlparsedata" + ] }, "magrittr": { "Package": "magrittr", "Version": "2.0.1", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "41287f1ac7d28a92f0a286ed507928d3", "Requirements": [] }, @@ -274,15 +327,24 @@ "Package": "pillar", "Version": "1.6.4", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "60200b6aa32314ac457d3efbb5ccbd98", - "Requirements": [] + "Requirements": [ + "cli", + "crayon", + "ellipsis", + "fansi", + "lifecycle", + "rlang", + "utf8", + "vctrs" + ] }, "pkgconfig": { "Package": "pkgconfig", "Version": "2.0.3", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "01f28d4278f15c76cddbea05899c5d6f", "Requirements": [] }, @@ -290,23 +352,34 @@ "Package": "pkgload", "Version": "1.2.4", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "7533cd805940821bf23eaf3c8d4c1735", - "Requirements": [] + "Requirements": [ + "cli", + "crayon", + "desc", + "rlang", + "rprojroot", + "rstudioapi", + "withr" + ] }, "processx": { "Package": "processx", "Version": "3.5.2", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "0cbca2bc4d16525d009c4dbba156b37c", - "Requirements": [] + "Requirements": [ + "R6", + "ps" + ] }, "ps": { "Package": "ps", "Version": "1.6.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "32620e2001c1dce1af49c49dccbb9420", "Requirements": [] }, @@ -314,45 +387,46 @@ "Package": "purrr", "Version": "0.3.4", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "97def703420c8ab10d8f0e6c72101e02", - "Requirements": [] + "Requirements": [ + "magrittr", + "rlang" + ] }, "rematch2": { "Package": "rematch2", "Version": "2.1.2", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "76c9e04c712a05848ae7a23d2f170a40", - "Requirements": [] + "Requirements": [ + "tibble" + ] }, "remotes": { "Package": "remotes", "Version": "2.4.2", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "227045be9aee47e6dda9bb38ac870d67", "Requirements": [] }, - "renv": { - "Package": "renv", - "Version": "0.15.0", - "Source": "Repository", - "Requirements": [] - }, "rex": { "Package": "rex", "Version": "1.2.1", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "ae34cd56890607370665bee5bd17812f", - "Requirements": [] + "Requirements": [ + "lazyeval" + ] }, "rlang": { "Package": "rlang", "Version": "0.4.12", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "0879f5388fe6e4d56d7ef0b7ccb031e5", "Requirements": [] }, @@ -360,15 +434,29 @@ "Package": "roxygen2", "Version": "7.1.2", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "eb9849556c4250305106e82edae35b72", - "Requirements": [] + "Requirements": [ + "R6", + "brew", + "commonmark", + "cpp11", + "desc", + "digest", + "knitr", + "pkgload", + "purrr", + "rlang", + "stringi", + "stringr", + "xml2" + ] }, "rprojroot": { "Package": "rprojroot", "Version": "2.0.2", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "249d8cd1e74a8f6a26194a91b47f21d1", "Requirements": [] }, @@ -376,7 +464,7 @@ "Package": "rstudioapi", "Version": "0.13", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "06c85365a03fdaf699966cc1d3cf53ea", "Requirements": [] }, @@ -384,15 +472,20 @@ "Package": "spelling", "Version": "2.2", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "b8c899a5c83f0d897286550481c91798", - "Requirements": [] + "Requirements": [ + "commonmark", + "hunspell", + "knitr", + "xml2" + ] }, "stringi": { "Package": "stringi", "Version": "1.7.6", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "bba431031d30789535745a9627ac9271", "Requirements": [] }, @@ -400,9 +493,13 @@ "Package": "stringr", "Version": "1.4.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "0759e6b6c0957edb1311028a49a35e76", - "Requirements": [] + "Requirements": [ + "glue", + "magrittr", + "stringi" + ] }, "styler": { "Package": "styler", @@ -412,24 +509,44 @@ "RemoteUsername": "r-lib", "RemoteRepo": "styler", "RemoteRef": "HEAD", - "RemoteSha": "5516800898656c145c41a8ff3e917ac36fdf86c6", + "RemoteSha": "bfa83091df9d6c5fab43c09bbb02c321bb304270", "RemoteHost": "api.github.com", - "Hash": "0c10899c9ca753f51f044298ef2841ca", - "Requirements": [] + "Hash": "c17a74859ab81e9b9e7a1ebfc6fc6155", + "Requirements": [ + "R.cache", + "cli", + "glue", + "magrittr", + "purrr", + "rematch2", + "rlang", + "rprojroot", + "tibble", + "withr" + ] }, "tibble": { "Package": "tibble", "Version": "3.1.6", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "8a8f02d1934dfd6431c671361510dd0b", - "Requirements": [] + "Requirements": [ + "ellipsis", + "fansi", + "lifecycle", + "magrittr", + "pillar", + "pkgconfig", + "rlang", + "vctrs" + ] }, "utf8": { "Package": "utf8", "Version": "1.2.2", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "c9c462b759a5cc844ae25b5942654d13", "Requirements": [] }, @@ -437,31 +554,35 @@ "Package": "vctrs", "Version": "0.3.8", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "ecf749a1b39ea72bd9b51b76292261f1", - "Requirements": [] + "Requirements": [ + "ellipsis", + "glue", + "rlang" + ] }, "withr": { "Package": "withr", "Version": "2.4.3", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "a376b424c4817cda4920bbbeb3364e85", "Requirements": [] }, "xfun": { "Package": "xfun", - "Version": "0.28", + "Version": "0.29", "Source": "Repository", - "Repository": "RSPM", - "Hash": "f7f3a61ab62cd046d307577a8ae12999", + "Repository": "CRAN", + "Hash": "e2e5fb1a74fbb68b27d6efc5372635dc", "Requirements": [] }, "xml2": { "Package": "xml2", "Version": "1.3.3", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "40682ed6a969ea5abfd351eb67833adc", "Requirements": [] }, @@ -469,7 +590,7 @@ "Package": "xmlparsedata", "Version": "1.0.5", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "45e4bf3c46476896e821fc0a408fb4fc", "Requirements": [] }, @@ -477,7 +598,7 @@ "Package": "yaml", "Version": "2.2.1", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Hash": "2826c5d9efb0a88f657c7a679c7106db", "Requirements": [] } From 2e1464fd0f3278d8576401d2b029824330de7970 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sun, 9 Jan 2022 16:01:00 +0100 Subject: [PATCH 08/13] more printing --- .github/workflows/hook-tests.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hook-tests.yaml b/.github/workflows/hook-tests.yaml index 78ea1a196..fdd82549e 100644 --- a/.github/workflows/hook-tests.yaml +++ b/.github/workflows/hook-tests.yaml @@ -70,8 +70,10 @@ jobs: renv::install(getwd(), dependencies = FALSE) # needed to make sure renv is activated in run_test() activate <- c( - "if (nzchar(Sys.getenv('R_PRECOMMIT_HOOK_ENV')))", - paste0("renv::load()"), + "if (nzchar(Sys.getenv('R_PRECOMMIT_HOOK_ENV'))) {", + " renv::load()", + " print(renv::status())", + "}", "print('R profile activated')" ) writeLines(activate, '.Rprofile') From 5c6a83834cc80c42ea9b06cdaaef1855f7c82e21 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sun, 9 Jan 2022 16:21:31 +0100 Subject: [PATCH 09/13] Rprofile must be at user level, since tests are ran from temp dir --- .github/workflows/hook-tests.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/hook-tests.yaml b/.github/workflows/hook-tests.yaml index fdd82549e..c552e1839 100644 --- a/.github/workflows/hook-tests.yaml +++ b/.github/workflows/hook-tests.yaml @@ -71,12 +71,12 @@ jobs: # needed to make sure renv is activated in run_test() activate <- c( "if (nzchar(Sys.getenv('R_PRECOMMIT_HOOK_ENV'))) {", - " renv::load()", - " print(renv::status())", + paste0(" renv::load(\"", getwd(), "\")"), + # " print(renv::status())", "}", "print('R profile activated')" ) - writeLines(activate, '.Rprofile') + writeLines(activate, '~/.Rprofile') shell: Rscript {0} - name: Perpare testing environment run: | From e38a4e96da50177a231c9fac0dd324586f92c6d9 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sun, 9 Jan 2022 18:32:54 +0100 Subject: [PATCH 10/13] invalidate windows cache --- .github/workflows/hook-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hook-tests.yaml b/.github/workflows/hook-tests.yaml index c552e1839..756f8d69b 100644 --- a/.github/workflows/hook-tests.yaml +++ b/.github/workflows/hook-tests.yaml @@ -53,7 +53,7 @@ jobs: with: path: ~\AppData\Local\renv key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('renv.lock') }} - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- + restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-2- - name: Install system dependencies (Linux) if: runner.os == 'Linux' From 1b3c8624481caa9979c960299e9a953a4a7884f4 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sun, 9 Jan 2022 18:58:31 +0100 Subject: [PATCH 11/13] use dev version to avoid https://github.com/rstudio/renv/issues/908 --- renv/activate.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renv/activate.R b/renv/activate.R index 226d6ccdb..1daf88876 100644 --- a/renv/activate.R +++ b/renv/activate.R @@ -2,7 +2,7 @@ local({ # the requested version of renv - version <- "0.15.0" + version <- "0.15.0-14" # the project directory project <- getwd() From f2ce58b566b7b298c6c3a03e535d0d10755c480b Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sun, 9 Jan 2022 19:02:24 +0100 Subject: [PATCH 12/13] don't install on push --- .pre-commit-config.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7ccf576ad..21c667884 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -97,16 +97,6 @@ repos: - id: tidy-gitignore - repo: local hooks: - - id: install-local - name: install-local - entry: Rscript -e "renv::deactivate(); devtools::install(dependencies = c('imports', 'depends'))" - language: r - additional_dependencies: - - callr - - devtools - - renv - stages: [push] - always_run: True - id: consistent-release-tag name: consistent-release-tag entry: Rscript inst/hooks/local/consistent-release-tag.R From 59f71548b360d4180d32f2b9282519ad4f1f7a97 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sun, 9 Jan 2022 19:05:07 +0100 Subject: [PATCH 13/13] downgrade --- renv/activate.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renv/activate.R b/renv/activate.R index 1daf88876..34d06b155 100644 --- a/renv/activate.R +++ b/renv/activate.R @@ -2,7 +2,7 @@ local({ # the requested version of renv - version <- "0.15.0-14" + version <- "0.15.0-13" # the project directory project <- getwd()