Skip to content

Commit

Permalink
[actions] update 14 packages
Browse files Browse the repository at this point in the history
  • Loading branch information
avallecam authored May 7, 2024
1 parent 33de2e8 commit e71008a
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 97 deletions.
41 changes: 30 additions & 11 deletions renv/activate.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ local({
attr(version, "sha") <- NULL

# the project directory
project <- getwd()
project <- Sys.getenv("RENV_PROJECT")
if (!nzchar(project))
project <- getwd()

# use start-up diagnostics if enabled
diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALSE")
Expand Down Expand Up @@ -129,6 +131,21 @@ local({

}

heredoc <- function(text, leave = 0) {

# remove leading, trailing whitespace
trimmed <- gsub("^\\s*\\n|\\n\\s*$", "", text)

# split into lines
lines <- strsplit(trimmed, "\n", fixed = TRUE)[[1L]]

# compute common indent
indent <- regexpr("[^[:space:]]", lines)
common <- min(setdiff(indent, -1L)) - leave
paste(substring(lines, common), collapse = "\n")

}

startswith <- function(string, prefix) {
substring(string, 1, nchar(prefix)) == prefix
}
Expand Down Expand Up @@ -631,6 +648,9 @@ local({

# if the user has requested an automatic prefix, generate it
auto <- Sys.getenv("RENV_PATHS_PREFIX_AUTO", unset = NA)
if (is.na(auto) && getRversion() >= "4.4.0")
auto <- "TRUE"

if (auto %in% c("TRUE", "True", "true", "1"))
return(renv_bootstrap_platform_prefix_auto())

Expand Down Expand Up @@ -822,24 +842,23 @@ local({

# the loaded version of renv doesn't match the requested version;
# give the user instructions on how to proceed
remote <- if (!is.null(description[["RemoteSha"]])) {
dev <- identical(description[["RemoteType"]], "github")
remote <- if (dev)
paste("rstudio/renv", description[["RemoteSha"]], sep = "@")
} else {
else
paste("renv", description[["Version"]], sep = "@")
}

# display both loaded version + sha if available
friendly <- renv_bootstrap_version_friendly(
version = description[["Version"]],
sha = description[["RemoteSha"]]
sha = if (dev) description[["RemoteSha"]]
)

fmt <- paste(
"renv %1$s was loaded from project library, but this project is configured to use renv %2$s.",
"- Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.",
"- Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.",
sep = "\n"
)
fmt <- heredoc("
renv %1$s was loaded from project library, but this project is configured to use renv %2$s.
- Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.
- Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.
")
catf(fmt, friendly, renv_bootstrap_version_friendly(version), remote)

FALSE
Expand Down
106 changes: 20 additions & 86 deletions renv/profiles/lesson-requirements/renv.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"R": {
"Version": "4.3.2",
"Version": "4.3.3",
"Repositories": [
{
"Name": "carpentries",
Expand Down Expand Up @@ -39,13 +39,14 @@
},
"bslib": {
"Package": "bslib",
"Version": "0.6.1",
"Version": "0.7.0",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"base64enc",
"cachem",
"fastmap",
"grDevices",
"htmltools",
"jquerylib",
Expand All @@ -56,7 +57,7 @@
"rlang",
"sass"
],
"Hash": "c0d8599494bc7fb408cd206bbdd9cab0"
"Hash": "8644cc53f43828f19133548195d7e59e"
},
"cachem": {
"Package": "cachem",
Expand All @@ -82,25 +83,14 @@
},
"digest": {
"Package": "digest",
"Version": "0.6.34",
"Version": "0.6.35",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"utils"
],
"Hash": "7ede2ee9ea8d3edbf1ca84c1e333ad1a"
},
"ellipsis": {
"Package": "ellipsis",
"Version": "0.3.2",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"rlang"
],
"Hash": "bb0eec2fe32e88d9e2836c2f73ea2077"
"Hash": "698ece7ba5a4fa4559e3d537e7ec3d31"
},
"evaluate": {
"Package": "evaluate",
Expand Down Expand Up @@ -134,14 +124,14 @@
},
"fs": {
"Package": "fs",
"Version": "1.6.3",
"Version": "1.6.4",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"methods"
],
"Hash": "47b5f30c720c23999b913a1a635cf0bb"
"Hash": "15aeb8c27f5ea5161f9f6a641fafd93a"
},
"glue": {
"Package": "glue",
Expand All @@ -167,20 +157,19 @@
},
"htmltools": {
"Package": "htmltools",
"Version": "0.5.7",
"Version": "0.5.8.1",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"base64enc",
"digest",
"ellipsis",
"fastmap",
"grDevices",
"rlang",
"utils"
],
"Hash": "2d7b3857980e0e0d0a1fd6f11928ab0f"
"Hash": "81d371a9cc60640e74e4ab6ac46dcedc"
},
"jquerylib": {
"Package": "jquerylib",
Expand All @@ -204,7 +193,7 @@
},
"knitr": {
"Package": "knitr",
"Version": "1.45",
"Version": "1.46",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -216,7 +205,7 @@
"xfun",
"yaml"
],
"Hash": "1ec462871063897135c1bcbe0fc8f07d"
"Hash": "6e008ab1d696a5283c79765fa7b56b47"
},
"lifecycle": {
"Package": "lifecycle",
Expand All @@ -231,16 +220,6 @@
],
"Hash": "b8552d117e1b808b09a832f589b79035"
},
"magrittr": {
"Package": "magrittr",
"Version": "2.0.3",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R"
],
"Hash": "7ce2733a9826b3aeb1775d56fd305472"
},
"memoise": {
"Package": "memoise",
"Version": "2.0.1",
Expand Down Expand Up @@ -285,7 +264,7 @@
},
"rmarkdown": {
"Package": "rmarkdown",
"Version": "2.25",
"Version": "2.26",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -298,18 +277,17 @@
"jsonlite",
"knitr",
"methods",
"stringr",
"tinytex",
"tools",
"utils",
"xfun",
"yaml"
],
"Hash": "d65e35823c817f09f4de424fcdfa812a"
"Hash": "9b148e7f95d33aac01f31282d49e4f44"
},
"sass": {
"Package": "sass",
"Version": "0.4.8",
"Version": "0.4.9",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -319,73 +297,29 @@
"rappdirs",
"rlang"
],
"Hash": "168f9353c76d4c4b0a0bbf72e2c2d035"
},
"stringi": {
"Package": "stringi",
"Version": "1.8.3",
"Source": "Repository",
"Repository": "RSPM",
"Requirements": [
"R",
"stats",
"tools",
"utils"
],
"Hash": "058aebddea264f4c99401515182e656a"
},
"stringr": {
"Package": "stringr",
"Version": "1.5.1",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"cli",
"glue",
"lifecycle",
"magrittr",
"rlang",
"stringi",
"vctrs"
],
"Hash": "960e2ae9e09656611e0b8214ad543207"
"Hash": "d53dbfddf695303ea4ad66f86e99b95d"
},
"tinytex": {
"Package": "tinytex",
"Version": "0.49",
"Version": "0.51",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"xfun"
],
"Hash": "5ac22900ae0f386e54f1c307eca7d843"
},
"vctrs": {
"Package": "vctrs",
"Version": "0.6.5",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"cli",
"glue",
"lifecycle",
"rlang"
],
"Hash": "c03fa420630029418f7e6da3667aac4a"
"Hash": "d44e2fcd2e4e076f0aac540208559d1d"
},
"xfun": {
"Package": "xfun",
"Version": "0.42",
"Version": "0.43",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"grDevices",
"stats",
"tools"
],
"Hash": "fd1349170df31f7a10bd98b0189e85af"
"Hash": "ab6371d8653ce5f2f9290f4ec7b42a8e"
},
"yaml": {
"Package": "yaml",
Expand Down

0 comments on commit e71008a

Please sign in to comment.