revdeprun
A command-line tool that automates reverse dependency checking for R packages.
Provision R on Ubuntu, install system dependencies, preinstall revdep
dependency binaries, configure environment context,
and run xfun::rev_check() in a single command.
Designed for cloud environments where you need reproducible, isolated test
runs without tedious manual setup.
Installation
Prerequisites
Install Rust:
|
Install C compiler and linker:
&&
Install revdeprun
From crates.io (stable release):
From GitHub (latest development version):
Note: If cargo or revdeprun is not found immediately after installation,
restart your shell.
Environment
Currently, this tool is designed for Ubuntu-based systems and requires:
- Operating system: Ubuntu 22.04 LTS, 24.04 LTS, and future LTS releases.
- Version control: Git on
PATH. - Network access: To download R, R packages, and repository metadata.
- Elevated privileges:
sudoaccess for installing R and system requirements.
Security note: Reverse dependency checks execute arbitrary third-party code.
Run revdeprun in temporary, isolated environments such as disposable cloud
instances or containers.
Usage
Simply point revdeprun at your package:
Git repository, local directory, or source tarball (.tar.gz) are supported.
Sensible defaults that make this fast and robust:
- Discover and install the current release version of R for Ubuntu.
- Pre-install system requirements for all reverse dependencies at once.
- Pre-install all dependencies required for checking reverse dependencies
from the Posit Public Package Manager (P3M) binary repository,
into a dedicated library in
revdep/library/. - Run
xfun::rev_check()for parallel reverse dependency checking. - Generate summary reports only for any check results with diffs.
- Use all available CPU cores for parallel installation and checking.
Command-line options
Usage: revdeprun [OPTIONS] <REPOSITORY>
Arguments:
<REPOSITORY>
Git URL, local directory, or source package tarball (.tar.gz) for the target R package
Options:
--r-version <R_VERSION>
R version to install (e.g., release, 4.3.3, oldrel-1)
[default: release]
--num-workers <N>
Number of parallel workers for xfun::rev_check()
[default: number of CPU cores]
--work-dir <WORK_DIR>
Optional workspace directory where temporary files are created
--skip-r-install
Skip installing R and reuse the system-wide installation
-h, --help
Print help
-V, --version
Print version
Example workflows
Standard check on a remote repository:
Specify R version and parallelism:
Use a custom workspace and SSH authentication:
Check a local directory:
Check a local source package tarball:
Use an existing R installation:
License
This project is licensed under the MIT License.