Skip to content

Commit

Permalink
Update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
wkmor1 committed Aug 23, 2023
1 parent da18716 commit 3576689
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 53 deletions.
60 changes: 32 additions & 28 deletions renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
},
"bslib": {
"Package": "bslib",
"Version": "0.5.0",
"Version": "0.5.1",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -253,7 +253,7 @@
"rlang",
"sass"
],
"Hash": "1b117970533deb6d4e992c1b34e9d905"
"Hash": "283015ddfbb9d7bf15ea9f0b5698f0d9"
},
"cachem": {
"Package": "cachem",
Expand Down Expand Up @@ -327,10 +327,13 @@
},
"cpp11": {
"Package": "cpp11",
"Version": "0.4.5",
"Version": "0.4.6",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "f07821e9b0aada6c999d4692e22a2ea7"
"Requirements": [
"R"
],
"Hash": "707fae4bbf73697ec8d85f9d7076c061"
},
"crayon": {
"Package": "crayon",
Expand All @@ -346,13 +349,13 @@
},
"curl": {
"Package": "curl",
"Version": "5.0.1",
"Version": "5.0.2",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R"
],
"Hash": "2118af9cb164c8d2dddc7b89eaf732d9"
"Hash": "511bacbfa153a15251166b463b4da4f9"
},
"data.table": {
"Package": "data.table",
Expand Down Expand Up @@ -546,15 +549,15 @@
},
"fontawesome": {
"Package": "fontawesome",
"Version": "0.5.1",
"Version": "0.5.2",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"htmltools",
"rlang"
],
"Hash": "1e22b8cabbad1eae951a75e9f8b52378"
"Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d"
},
"fs": {
"Package": "fs",
Expand All @@ -580,7 +583,7 @@
},
"ggplot2": {
"Package": "ggplot2",
"Version": "3.4.2",
"Version": "3.4.3",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -601,7 +604,7 @@
"vctrs",
"withr"
],
"Hash": "3a147ee02e85a8941aad9909f1b43b7b"
"Hash": "85846544c596e71f8f46483ab165da33"
},
"glue": {
"Package": "glue",
Expand All @@ -616,7 +619,7 @@
},
"gtable": {
"Package": "gtable",
"Version": "0.3.3",
"Version": "0.3.4",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -627,7 +630,7 @@
"lifecycle",
"rlang"
],
"Hash": "b44addadb528a0d227794121c00572a0"
"Hash": "b29cf3031f49b04ab9c852c912547eef"
},
"highr": {
"Package": "highr",
Expand Down Expand Up @@ -656,7 +659,7 @@
},
"htmltools": {
"Package": "htmltools",
"Version": "0.5.5",
"Version": "0.5.6",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -669,7 +672,7 @@
"rlang",
"utils"
],
"Hash": "ba0240784ad50a62165058a27459304a"
"Hash": "a2326a66919a3311f7fbb1e3bf568283"
},
"httpuv": {
"Package": "httpuv",
Expand All @@ -688,7 +691,7 @@
},
"httr": {
"Package": "httr",
"Version": "1.4.6",
"Version": "1.4.7",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -699,7 +702,7 @@
"mime",
"openssl"
],
"Hash": "7e5e3cbd2a7bc07880c94e22348fb661"
"Hash": "ac107251d9d9fd72f0ca8049988f1d7f"
},
"isoband": {
"Package": "isoband",
Expand Down Expand Up @@ -1099,18 +1102,19 @@
},
"promises": {
"Package": "promises",
"Version": "1.2.0.1",
"Version": "1.2.1",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R6",
"Rcpp",
"fastmap",
"later",
"magrittr",
"rlang",
"stats"
],
"Hash": "4ab2c43adb4d4699cf3690acd378d75d"
"Hash": "0d8a15c9d000970ada1ab21405387dee"
},
"ps": {
"Package": "ps",
Expand All @@ -1125,7 +1129,7 @@
},
"purrr": {
"Package": "purrr",
"Version": "1.0.1",
"Version": "1.0.2",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -1136,7 +1140,7 @@
"rlang",
"vctrs"
],
"Hash": "d71c815267c640f17ddbf7f16144b4bb"
"Hash": "1cba04a4e9414bdefc9dcaa99649a8dc"
},
"ragg": {
"Package": "ragg",
Expand Down Expand Up @@ -1199,13 +1203,13 @@
},
"renv": {
"Package": "renv",
"Version": "1.0.0",
"Version": "1.0.2",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"utils"
],
"Hash": "c321cd99d56443dbffd1c9e673c0c1a2"
"Hash": "4b22ac016fe54028b88d0c68badbd061"
},
"rlang": {
"Package": "rlang",
Expand All @@ -1220,7 +1224,7 @@
},
"rmarkdown": {
"Package": "rmarkdown",
"Version": "2.23",
"Version": "2.24",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -1240,7 +1244,7 @@
"xfun",
"yaml"
],
"Hash": "79f14e53725f28900d936f692bfdd69f"
"Hash": "3854c37590717c08c32ec8542a2e0a35"
},
"rprojroot": {
"Package": "rprojroot",
Expand Down Expand Up @@ -1522,13 +1526,13 @@
},
"tinytex": {
"Package": "tinytex",
"Version": "0.45",
"Version": "0.46",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"xfun"
],
"Hash": "e4e357f28c2edff493936b6cb30c3d65"
"Hash": "0c41a73214d982f539c56a7773c7afa5"
},
"utf8": {
"Package": "utf8",
Expand Down Expand Up @@ -1614,14 +1618,14 @@
},
"xfun": {
"Package": "xfun",
"Version": "0.39",
"Version": "0.40",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"stats",
"tools"
],
"Hash": "8f56e9acb54fb525e66464d57ab58bcb"
"Hash": "be07d23211245fc7d4209f54c4e4ffc8"
},
"xml2": {
"Package": "xml2",
Expand Down
70 changes: 45 additions & 25 deletions renv/activate.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,27 @@
local({

# the requested version of renv
version <- "1.0.0"
version <- "1.0.2"
attr(version, "sha") <- NULL

# the project directory
project <- getwd()

# use start-up diagnostics if enabled
diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALSE")
if (diagnostics) {
start <- Sys.time()
profile <- tempfile("renv-startup-", fileext = ".Rprof")
utils::Rprof(profile)
on.exit({
utils::Rprof(NULL)
elapsed <- signif(difftime(Sys.time(), start, units = "auto"), digits = 2L)
writeLines(sprintf("- renv took %s to run the autoloader.", format(elapsed)))
writeLines(sprintf("- Profile: %s", profile))
print(utils::summaryRprof(profile))
}, add = TRUE)
}

# figure out whether the autoloader is enabled
enabled <- local({

Expand Down Expand Up @@ -504,7 +519,7 @@ local({

# open the bundle for reading
# We use gzcon for everything because (from ?gzcon)
# > Reading from a connection which does not supply a gzip magic
# > Reading from a connection which does not supply a 'gzip' magic
# > header is equivalent to reading from the original connection
conn <- gzcon(file(bundle, open = "rb", raw = TRUE))
on.exit(close(conn))
Expand Down Expand Up @@ -767,10 +782,12 @@ local({
renv_bootstrap_validate_version <- function(version, description = NULL) {

# resolve description file
description <- description %||% {
path <- getNamespaceInfo("renv", "path")
packageDescription("renv", lib.loc = dirname(path))
}
#
# avoid passing lib.loc to `packageDescription()` below, since R will
# use the loaded version of the package by default anyhow. note that
# this function should only be called after 'renv' is loaded
# https://github.com/rstudio/renv/issues/1625
description <- description %||% packageDescription("renv")

# check whether requested version 'version' matches loaded version of renv
sha <- attr(version, "sha", exact = TRUE)
Expand Down Expand Up @@ -841,7 +858,7 @@ local({
hooks <- getHook("renv::autoload")
for (hook in hooks)
if (is.function(hook))
tryCatch(hook(), error = warning)
tryCatch(hook(), error = warnify)

# load the project
renv::load(project)
Expand Down Expand Up @@ -982,10 +999,15 @@ local({

}

renv_bootstrap_version_friendly <- function(version, sha = NULL) {
renv_bootstrap_version_friendly <- function(version, shafmt = NULL, sha = NULL) {
sha <- sha %||% attr(version, "sha", exact = TRUE)
parts <- c(version, sprintf("[sha: %s]", substring(sha, 1L, 7L)))
paste(parts, collapse = " ")
parts <- c(version, sprintf(shafmt %||% " [sha: %s]", substring(sha, 1L, 7L)))
paste(parts, collapse = "")
}

renv_bootstrap_exec <- function(project, libpath, version) {
if (!renv_bootstrap_load(project, libpath, version))
renv_bootstrap_run(version, libpath)
}

renv_bootstrap_run <- function(version, libpath) {
Expand Down Expand Up @@ -1017,6 +1039,14 @@ local({
commandArgs()[[1]] == "RStudio"
}

# Used to work around buglet in RStudio if hook uses readline
renv_bootstrap_flush_console <- function() {
tryCatch({
tools <- as.environment("tools:rstudio")
tools$.rs.api.sendToConsole("", echo = FALSE, focus = FALSE)
}, error = function(cnd) {})
}

renv_json_read <- function(file = NULL, text = NULL) {

jlerr <- NULL
Expand Down Expand Up @@ -1155,25 +1185,15 @@ local({
# construct full libpath
libpath <- file.path(root, prefix)

# attempt to load
if (renv_bootstrap_load(project, libpath, version))
return(TRUE)

if (renv_bootstrap_in_rstudio()) {
# RStudio only updates console once .Rprofile is finished, so
# instead run code on sessionInit
setHook("rstudio.sessionInit", function(...) {
renv_bootstrap_run(version, libpath)

# Work around buglet in RStudio if hook uses readline
tryCatch(
{
tools <- as.environment("tools:rstudio")
tools$.rs.api.sendToConsole("", echo = FALSE, focus = FALSE)
},
error = function(cnd) {}
)
renv_bootstrap_exec(project, libpath, version)
renv_bootstrap_flush_console()
})
} else {
renv_bootstrap_run(version, libpath)
renv_bootstrap_exec(project, libpath, version)
}

invisible()
Expand Down

0 comments on commit 3576689

Please sign in to comment.