For us, there is no spring. Just the wind that smells fresh before the storm
conan
provides a light wrapper around pkgdepends
in order to create standalone libraries. Our use case is creating libraries for use with HPC systems. It is not as broad or designed for interactive use like renv
, packrat
or pak
. Instead it tries to address the narrow problem of “how do you install packages from diverse sources without necessarily already having your package installer present?”.
To solve this problem, create a standalone script that can install its own dependencies and then install a required set of packages:
That will create a file like:
#!/usr/bin/env Rscript
`%||%` <- function (x, y)
{if (is.null(x))
yelse x
[... skip ...]<- parse_main_conan(name = "script")
.dat <- c("cpp11", "mrc-ide/dust", "mrc-ide/mcstate@some-feature")
.packages <- c(CRAN = "https://cloud.r-project.org")
.repos <- "upgrade"
.policy <- .dat$lib
.lib conan_install(.lib, .packages, policy = .policy, repos = .repos)
Then this script can be run from the command line:
./script lib
(or on Windows Rscript script lib
), which will create a library at path lib
All the dependency resolution is done by pkgdepends
. Use of the Remotes field in DESCRIPTION can create impossible installation situations, beware. In particular, if a package is installed from a CRAN-like repo and also via a Remotes:
field in a package you are installing via a remotes-style reference, then you will get a “conflict” from pkgdepends.