Skip to content

Commit 3e4c2f9

Browse files
Merge pull request #418 from lorenzwalthert/hook-dependency-update
update hook dependencies
2 parents 82b4162 + 738518d commit 3e4c2f9

File tree

5 files changed

+32
-25
lines changed

5 files changed

+32
-25
lines changed

.github/workflows/hook-dependencies-update.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,17 @@ jobs:
3232
sudo -s eval "$sysreqs"
3333
- name: update existing packages
3434
run: |
35-
options(repos = c(CRAN = "https://packagemanager.rstudio.com/all/latest"))
36-
install.packages('renv')
37-
install.packages('jsonlite')
38-
renv_deps <- names(jsonlite::read_json('renv.lock')$Packages)
35+
options(
36+
repos = c(CRAN = "https://packagemanager.rstudio.com/all/latest"),
37+
install.packages.compile.from.source = "never"
38+
)
39+
install.packages("renv")
40+
install.packages("jsonlite")
41+
renv_deps <- names(jsonlite::read_json("renv.lock")$Packages)
3942
renv::load()
4043
renv::restore(prompt = FALSE)
4144
can_be_updated <- renv::update(renv_deps, prompt = FALSE)
42-
renv::snapshot(packages = renv_deps)
45+
renv::snapshot(packages = renv_deps, prompt = FALSE)
4346
shell: Rscript {0}
4447
- name: update dependency graph among packages
4548
run: |

renv.lock

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@
2424
},
2525
"R.methodsS3": {
2626
"Package": "R.methodsS3",
27-
"Version": "1.8.1",
27+
"Version": "1.8.2",
2828
"Source": "Repository",
29-
"Repository": "CRAN",
30-
"Hash": "4bf6453323755202d5909697b6f7c109",
29+
"Repository": "RSPM",
30+
"Hash": "278c286fd6e9e75d0c2e8f731ea445c8",
3131
"Requirements": []
3232
},
3333
"R.oo": {
3434
"Package": "R.oo",
35-
"Version": "1.24.0",
35+
"Version": "1.25.0",
3636
"Source": "Repository",
37-
"Repository": "CRAN",
38-
"Hash": "5709328352717e2f0a9c012be8a97554",
37+
"Repository": "RSPM",
38+
"Hash": "a0900a114f4f0194cf4aa8cd4a700681",
3939
"Requirements": [
4040
"R.methodsS3"
4141
]
@@ -302,15 +302,10 @@
302302
},
303303
"lintr": {
304304
"Package": "lintr",
305-
"Version": "2.0.1.9000",
306-
"Source": "GitHub",
307-
"RemoteType": "github",
308-
"RemoteUsername": "jimhester",
309-
"RemoteRepo": "lintr",
310-
"RemoteRef": "HEAD",
311-
"RemoteSha": "1ae01287f9c97536e097715beb08e88a25632067",
312-
"RemoteHost": "api.github.com",
313-
"Hash": "4d0a806974012edb045272ac3fcf9e72",
305+
"Version": "3.0.0",
306+
"Source": "Repository",
307+
"Repository": "RSPM",
308+
"Hash": "1214604176fb93fdcac030fc5d2177d9",
314309
"Requirements": [
315310
"backports",
316311
"codetools",
@@ -377,10 +372,10 @@
377372
},
378373
"processx": {
379374
"Package": "processx",
380-
"Version": "3.5.3",
375+
"Version": "3.6.0",
381376
"Source": "Repository",
382377
"Repository": "RSPM",
383-
"Hash": "8bbae1a548d0d3fdf6647bdd9d35bf6d",
378+
"Hash": "4acae60adac4791e8c8833d8494f270d",
384379
"Requirements": [
385380
"R6",
386381
"ps"

renv/activate.R

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ local({
5454
# mask 'utils' packages, will come first on the search path
5555
library(utils, lib.loc = .Library)
5656

57-
# unload renv if it's already been laoded
57+
# unload renv if it's already been loaded
5858
if ("renv" %in% loadedNamespaces())
5959
unloadNamespace("renv")
6060

@@ -314,9 +314,18 @@ local({
314314
}
315315

316316
# bail if it doesn't exist
317-
if (!file.exists(tarball))
317+
if (!file.exists(tarball)) {
318+
319+
# let the user know we weren't able to honour their request
320+
fmt <- "* RENV_BOOTSTRAP_TARBALL is set (%s) but does not exist."
321+
msg <- sprintf(fmt, tarball)
322+
warning(msg)
323+
324+
# bail
318325
return()
319326

327+
}
328+
320329
fmt <- "* Bootstrapping with tarball at path '%s'."
321330
msg <- sprintf(fmt, tarball)
322331
message(msg)
@@ -800,7 +809,7 @@ local({
800809

801810
# find strings in the JSON
802811
pattern <- '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
803-
locs <- gregexpr(pattern, text)[[1]]
812+
locs <- gregexpr(pattern, text, perl = TRUE)[[1]]
804813

805814
# if any are found, replace them with placeholders
806815
replaced <- text
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)