Skip to contents

Check how changes to your R package affect packages that depend on it. revdeprunner compares reverse dependencies against the released version and your development checkout using revdepcheck, with reusable package binaries and resumable runs. Currently supports Linux only.

Installation

Install from GitHub using pak:

pak::pak("jlmelville/revdeprunner", dependencies = TRUE)

If needed, install pak first with install.packages("pak"). You also need the compilers and system libraries required by the packages being checked; revdeprunner reports missing prerequisites but does not install operating-system packages.

Quick start

1. Plan. Preview how many packages will be checked and how many need building:

library(revdeprunner)

package <- "/path/to/development/package"
plan <- revdep_plan(package)

plan

By default, this selects direct CRAN reverse dependencies. Planning does not download, build, or check packages. Use plan$requirements to inspect the unique selected targets and dependencies that need preparation, including their system requirements.

2. Prepare. Reuse cached binaries and build the remaining packages:

prepared <- revdep_prepare(plan, verbose = TRUE)

prepared
prepared$problems

If prepared$problems has rows, resolve them before checking (see retrying below). Use verbose = TRUE to follow preparation and comparison progress; the default is silent. Preparation prints active log paths and the process budget before each installation, then elapsed time when it finishes. You can inspect those logs while a long build is still running.

3. Check. Compare the released and development versions:

if (nrow(prepared$problems) == 0L) {
  result <- revdep_check(prepared, verbose = TRUE)

  result
  result$results
  result$changes
  result$diagnostics
}

result prints a summary; result$results lists each package’s outcome: unchanged, changed, incomplete, or not_checked. Review added and removed errors, warnings, and notes in result$changes. Use result$diagnostics to investigate incomplete checks before treating the run as complete.

Retrying

Preparation failures appear in prepared$problems, with diagnostic excerpts and log paths. After fixing a prerequisite, repeat prepared <- revdep_prepare(plan) to reuse completed work.

Repeat revdep_check(prepared) with the same development checkout to resume unfinished targets and reuse completed comparisons, including changed results. After repairing a system library, use revdep_check(prepared, repeat_checks = TRUE) to repeat both sides of every comparison. To refresh repository metadata and package versions, create a new plan and prepare it again.

More options

To include up to 20 additional recursive reverse dependencies while keeping all direct targets:

plan <- revdep_plan(package, recursive = TRUE, max_recursive = 20)

See configuration and troubleshooting for cache locations, repository options, and unavailable dependencies. The function reference covers arguments and return values; it is also available in R through ?revdep_plan, ?revdep_prepare, and ?revdep_check.

For contributors, ARCHITECTURE.md maps source files, state ownership, recovery, and validation boundaries.

License

Licensed under the GNU General Public License, version 3 or any later version.