Hello @Gabor and pak development team!
We've been using renv to handle dependency management and installs, but recently given pak a go to see how the grass is on the other side.
I have a package that I have to support for a legacy system running R3 (ugh). And to make this possible some package versions in the DESCRIPTION file have hard pins ==
or upper bounds <=
on the version.
renv
has been able to handle installing this on the system, selecting the right versions of the dependencies to satisfy the archaic environment. When I tried this with pak
it reported errors attempting to resolve the dependencies, that looked like this:
* Can't install dependency cpp11 (== 0.5.0) (== 1.1.0) (<= 1.6.1) (== 1.0.1) (== 1.0.0)
* Can't install dependency hardhat (== 1.1.0) (<= 1.6.1) (== 1.0.1) (== 1.0.0)
* Can't install dependency httpuv (<= 1.6.1) (== 1.0.1) (== 1.0.0)
* Can't install dependency purrr (== 1.0.1) (== 1.0.0)
* Can't install dependency yardstick (== 1.0.0)
* cpp11: Needs R >= 4.0.0
* hardhat: Can't install dependency sparsevctrs (>= 0.2.0)
* sparsevctrs: Needs R >= 4.0.0
* purrr: Needs R >= 4.0
* yardstick: Can't install dependency hardhat (>= 1.3.0)
The reason for the upper bounds / pins is because the later versions of some of these packages require R4. These errors look like pak
is trying to fetch the latest versions of these packages and correctly identifying that it can't install them in the current R3 environment.
Am I doing something wrong? Does pak
support ==
and <=
notation in the DESCRIPTION file?
I had hoped that it might even be able to automatically resolve the possible dependencies and find the latest version that satisfied the R3 constraint Although I know that this kind of dependency search can be extremely expensive. Though hoped that doing it on the package repo meta data might allow it.
Project looks super cool and promising, hoping to get a better understanding of it to see if it meets our needs. Thank you very much!