Description
Note
We are leaving this issue open so that anyone who experiences issues know to upgrade {renv}
Recommendation
It is recommended for users to use {renv} version >= 0.17.2 (currently on CRAN) OR {renv} version <= 0.16.0.
Please run install.packages("renv")
from your R console to upgrade.
Note
What follows below are protocols for when {renv} version 0.17.2 was not yet on CRAN.'
If you have {renv} version >= 0.17.2, then you do not need to do anything.
Test if you need to update your version of {renv}
To test if you need to update your version of {renv}, run this R code in your R console:
packageVersion("renv") > package_version("0.17.1")
#> [1] TRUE
If the result is TRUE
, then you do not need to do anything.
If the result is FALSE
, then follow one of the steps below.
Upgrading to the patched version: 0.17.0-38
To upgrade to the patched version of {renv}, use the following code to install renv version 0.17.0-38 from The Carpentries R-universe. Note: this is the version that {sandpaper} will use to build your R Markdown lessons on GitHub.
install.packages('renv', repos = c('https://carpentries.r-universe.dev', 'https://cloud.r-project.org'))
Note
renv 0.17.1 has a bug with its package cache (see rstudio/renv#1168) where the hashing changed.
This has been fixed in 0.17.2.
Downgrading to 0.16.0
If you wish to downgrade {renv} instead, you can install {renv} from an archive:
install.packages("https://cran.r-project.org/src/contrib/Archive/renv/renv_0.16.0.tar.gz")
Problem
The new version of {renv} 0.17.0 introduced a few unexpected bugs:
- The
renv/
folder now contains a locked sandbox folder, which causes teardown errors:rm: cannot remove '/tmp/Rtmp7JrJC1/Rbuild184d2b8b02c/sandpaper/renv/sandbox/R-4.2/x86_64-pc-linux-gnu/99f2a2ef/spatial': Permission denied ... snip ... rm: cannot remove '/tmp/Rtmp7JrJC1/Rbuild184d2b8b02c/sandpaper/renv/sandbox/R-4.2/x86_64-pc-linux-gnu/99f2a2ef/foreign': Permission denied
- The welcome message has changed so our regex no longer works and causes R CMD check to fail:
--- re-building ‘building-with-renv.Rmd’ using rmarkdown Quitting from lines 44-48 (building-with-renv.Rmd) Error: Error: processing vignette 'building-with-renv.Rmd' failed with diagnostics: NA/NaN argument
- BioConductor packages can no longer be provisioned or restored (see renv 0.17.0 issues with provisioning non-CRAN packages rstudio/renv#1156)
- Continuous Integration is failing in ways that I cannot debug at the moment (see {renv} 0.17.0 cannot find rmarkdown on hydrate with bare project on CI rstudio/renv#1161 and [temporary fix] use devel renv #405)
Lessons Affected
- BioConductor Lessons can no longer restore their package cache
- New R Markdown lessons can no longer add new packages to the cache
All other existing lessons should work as expected.