miraisolutions/techguides

Renv and rsconnect updates

GuidoMaggio opened this issue · 0 comments

There few new things to update in the technical guide.

https://rstudio.github.io/renv/news/index.html

  • renv::init() now uses Posit Public Package Manager by default
  • snapshot.type = "explicit" is not sufficient anymore, because Suggests packages must be in renv lock
  • renv::install()call required to install development packages if the project is "explicit"
  • settings.dcf is not created anymore, there is a json file
  • New renv::checkout() installing the latest-available packages from a repository. For example, renv::checkout(date = "2023-02-08") will install the packages available on 2023-02-08 from the Posit Package Manager repository. 3.2.1 of tech guides to be updated
  • Handling of development dependencies has been refined. renv::snapshot() and renv::status() no longer track development dependencies. To check if something must be written
  • mention renv::dependencies()? check if worth
  • Deployment with rsconnect, changed from rsconnect 1.0.2. rsconnect must be part of the renv project (init "implicit").
  • rsconnect::writeManifest() required for Posit Connect

Something more:

  • mran is retired (3.2.1)
renv::install("remotes")
(deps <- remotes::dev_package_deps(dependencies = TRUE))
renv::install(with(deps, sprintf("%s@%s", package[diff!=0], available[diff!=0])))

Installs all latest packages, there can be issues with new releases of renv and rsconnect

4.2.1.3 Deployment
options(rsconnect.pkrat = FALSE) or TRUE depending if deployment should happen with renv