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. Supports Linux and macOS.

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. On macOS, install Apple’s Command Line Tools and, for packages containing Fortran, a compiler compatible with your R installation. See the R macOS toolchain guidance and platform details.

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$workload to see which targets and dependency roots contribute the largest overlapping workloads. 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
head(prepared$timings)

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. Progress includes validation timings, processed cache entries, and the active comparison package, old/new side, check stage, elapsed time, and log path. 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. Printing prepared shows cumulative recorded preparation timings and slow builds, including historical attempts on resumed runs. Dependency binaries are reused in comparison, but each selected target is checked from source on both old/new sides and compiles again when needed. Preparation build timings are reference measurements, not estimates of remaining check time.

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. When per-side results are missing, diagnostics retain a bounded runner error excerpt alongside the process logs referenced in result$evidence$logs.

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.