Result of `renv::install(lock = TRUE)` differs from `renv::install(lock = FALSE); renv::snapshot()`
salim-b opened this issue · comments
I'm using renv with its "explicit"
snapshot type and just tested the new lock
argument for renv::install()
introduced in renv 1.0.4.
I noticed that when I install a new package1 using
renv::install("rsvg", lock = TRUE)
renv writes the following lines to my project's renv.lock
:
"rsvg": {
"Package": "rsvg",
"Version": "2.6.0",
"OS_type": null,
"NeedsCompilation": "yes",
"Repository": "CRAN",
"Source": "Repository",
"Path": "/home/salim/.cache/R/renv/cache/v5/R-4.3/x86_64-pc-linux-gnu/rsvg/2.6.0/7aaf92c4adddc8a85696ae7f0123a725/rsvg"
},
When installing the same package using
renv::install("rsvg", lock = FALSE)
renv::snapshot()
OTOH, renv writes these lines to the renv.lock
:
"rsvg": {
"Package": "rsvg",
"Version": "2.6.0",
"Source": "Repository",
"Repository": "RSPM",
"Hash": "7aaf92c4adddc8a85696ae7f0123a725"
},
I guess this isn't supposed to be the intended behaviour, no?
I was first delighted by the new lock
argument since it'd give a better UX for renv's explicit snapshot type, but I really don't wanna write local filesystem paths to an renv project's lock file shared with others...
Footnotes
🤦 Thanks for the bug report; I'll get this fixed up.
Should hopefully be fixed via 2efbbdd.