I'm running a somewhat tight ship in regard to available libraries in my docker based R setup. Thus, package updates are performed conservatively and consciously. New versions are more or less hand picked. In this context I realised that incrementing a package's version will not complain in regard to outdated dependencies if the dependency is already installed in a smaller version than is actually required.
An example is shown below to demonstrate what I mean. The example was created on a "clean" R 4.1.2 without any packages installed except for the ones that come directly with R.
I'm aware that the paramter settings dependencies = FALSE and upgrade = "never" prevent installing/upgrading dependencies (I need these settings for stringent control), however, I would have expected at least a warning telling me that e.g. askpass 1.2.0 requires at least sys 2.1 or equivalently that highr 0.10 requires at least xfun 0.18.
Presumably problems will only start showing up on runtime of certain features, which I would like to prevent.
Is there a clever way handle this?
install.packages("remotes", dependencies = FALSE) # 2.4.2.1
remotes::install_version("sys",
version = "2.0",
dependencies = FALSE,
upgrade = "never")
remotes::install_version("askpass",
version = "1.2.0",
dependencies = FALSE,
upgrade = "never")
remotes::install_version("xfun",
version = "0.17",
dependencies = FALSE,
upgrade = "never")
remotes::install_version("highr",
version = "0.10",
dependencies = FALSE,
upgrade = "never")
Not sure if this qualifies as "clever" but at least it returns the required information to remedy outdated dependencies problem.
Returns: