minver
A workflow for finding the minimum required versions of all packages that your package imports.
How does it work?
-
It creates a baseline library via
remotes::install_deps(dependencies = TRUE)
. -
Imported packages are sorted topologically, packages that depend on other packages come first. Versions are erased from the
DESCRIPTION
. -
For each imported package, a bisection along the available versions (obtained via
crandb::package(version = "all")
) is made. The baseline library is copied (using symlinks), and the packages for which minimum versions are to be tested are installed usingremotes::install_version()
. The test criterion is a successfulR CMD check
without NOTEs. -
The minimum version for each package is written to the
DESCRIPTION
.
Prerequisites
-
Clone this project and install packages (or launch binder or rstudio.cloud from the badge at the top of this README)
# install.packages("remotes") remotes::install_deps()
-
Clone the package you want to find minimum versions for
-
Adapt
00-*.R
to point to your package
Run it
Run each script ??-*.R
in sequence, the 05-*.R
script must be run repeatedly until the error "All versions determined, move to next script."
is raised.
The following files are created:
gen.rds
: Imported packages sorted by "generation" (topologically)baseline.rds
: All CRAN versions of imported packageslib/
: The baseline librarycandidate-####.rds
: Intermediate results of the bisection