# Changelog

## revdeprun 2.1.0

### Bug fixes

- revdeprun now makes sure to exclude the `revdep/` directory from package
  builds by appending `^revdep$` to `.Rbuildignore`. Without this, the
  `xfun::rev_check()` step could be slowed down dramatically when a
  large number of dependencies for revdep checks are installed (#125).

### Improvements

- Apply an xfun monkey patch to parallelize `xfun:::download_tarball()`.
  The number of parallel download workers is set to 5 to accelerate
  revdep tarball downloads during `xfun::rev_check()` (#127).

## revdeprun 2.0.0

### Improvements

- Apply monkey patch for pkgdepends embedded in pak, to refill the worker pool
  up to the number of workers after each poll and update `deps_left` only for
  packages that still need it.
  This change substantially accelerates `pak::pkg_install()` when installing
  large dependency sets for revdep checks (#121).

## revdeprun 1.4.5

### Maintenance

- Removed the temporary workaround for `xfun::compare_Rcheck()` as xfun 0.55
  is now available on CRAN and includes the fix (#118).

## revdeprun 1.4.4

### Documentation

- Improve workflow diagrams with pastel color palette to improve visual
  hierarchy and readability, using consistent semantic color mapping across
  both phases (#115).

## revdeprun 1.4.3

### Documentation

- Add workflow diagrams to `README.md` visualizing the two-phase workflow:
  Phase 1 (environment setup) and Phase 2 (dependency installation and
  reverse dependency checking) (#112).
- Add tips to `README.md` on preventing system sleep during long-running
  checks to maintain SSH connections and continuous terminal output,
  with platform-specific instructions for macOS and Windows (#109, #110).

## revdeprun 1.4.2

### Improvements

- Always install the latest stable Quarto release by resolving the version
  number from the official download metadata (#106).

## revdeprun 1.4.1

### Improvements

- Ignore packages that fail to build or are unavailable by appending pak
  ignore qualifiers during pre-installation. Retry attempts for transient
  download errors increased from 3 to 5 (#102).
- Revert headless X11 display changes from #97. Now we run `Rscript`
  directly as packages that fail to build are ignored automatically (#103).

## revdeprun 1.4.0

### Improvements

- Install reverse dependency prerequisites with `pak::pkg_install()` so
  Bioconductor dependencies resolve automatically while still respecting
  the curated dependency set, retrying transient download failures (#95).
- Run reverse dependency installs under a headless display and provision
  the required X11 tooling so Tcl/Tk packages compile reliably (#97).

## revdeprun 1.3.0

### Bug fixes

- Fix package installation errors by normalizing the revdep library path
  to an **absolute path** so the generated R scripts always point to the
  absolute library directory. This prevents silent library path setting
  failures (!) and guarantees that `xfun::rev_check()` will always use the
  correct library path containing the preinstalled binaries (#90).
- Fix package building errors by enhancing the logic in `revdep.rs`
  to parse and install the development dependencies for the package being
  checked, from both the CRAN version and the development version (#88).

## revdeprun 1.2.1

### Bug fixes

- Add and run a temporary workaround function to fix an issue where the
  check comparison results are not written into the Markdown output by
  `xfun::compare_Rcheck()` (#82).

### Improvements

- Align the reverse dependency run script options with yihui/crandalf defaults
  with modifications so `xfun::rev_check()` has sensible browser, compilation,
  timeout, sampling, and Markdown summary report retention settings (#81).

### Documentation

- Add `SECURITY.md` to document security risks, best practices, and
  vulnerability reporting procedures. Update `README.md` to prominently
  display security best practices with a more visible callout format (#83).

## revdeprun 1.2.0

### Bug fixes

- Respect the number of workers detected by Rust or provided by user
  in `revdep.rs` instead of taking the max with `parallel::detectCores()`,
  to be consistent with `sysreqs.rs` (#77).

### Improvements

- Replace `num_cpus` with `std::thread::available_parallelism()` to reduce
  the number of dependencies (#77).

## revdeprun 1.1.3

### Improvements

- Reuse the shared progress logging helper so the installer path no longer
  carries its own copy of `emit_stream` (#74).

### Documentation

- Clarify supported Ubuntu versions are limited to LTS releases in `README.md` (#72).
- Fix spelling in comments and error messages (#73).

## revdeprun 1.1.2

### Improvements

- Install TinyTeX via Quarto commands used in official GitHub Actions workflows
  and improve existing installation detection (#69).

## revdeprun 1.1.1

### Improvements

- Update progress messages during R prerequisite installation to
  accurately reflect that the system requirements being installed are
  for the R package {pak}, rather than for revdep dependencies (#66).

## revdeprun 1.1.0

### New features

- Accept local source package tarballs (`.tar.gz`) as inputs for reverse
  dependency checks (#61).

### Improvements

- Launch `Rscript` with an auto-tuned `--max-connections` value based
  on the CPU core count to avoid potential connection limits during parallel
  reverse dependency checks on high-CPU instances (#60).

## revdeprun 1.0.0

### Significant changes

- Replace the {revdepcheck.extras} workflow with a fast binary pre-installation
  phase followed by `xfun::rev_check()`.

  The new approach installs the binary packages required for checking reverse
  dependencies from Posit Public Package Manager (P3M) into `revdep/library/`
  before running the parallel checks.
  This combination dramatically reduces the pre-install time while making
  the checks more deterministic and robust (#48, #51).

  A special thanks to @yihui for his work on `xfun::rev_check()`
  and the helpful discussions enabling this improvement.

- Refactor workspace management to separate the cloned repo and temporary file
  directory (#52). This makes the directory structure canonical and predictable.

## revdeprun 0.6.0

### Significant changes

- Migrate from {revdepcheck} to Henrik Bengtsson's {revdepcheck.extras},
  which provides deterministic pre-installation and caching for
  revdep dependencies (#42).

  This might reduce "package suggested but not available" errors when
  running revdepcheck. It may also reduce potential repeated compilation of
  the same dependency across different revdeps due to the "caching dependencies
  while checking multiple packages" mechanism.

### Improvements

- Set `timeout` to the more sensible 60 minutes instead of the previous
  12 hours. This is consistent with the default value used by
  `revdepcheck.extras::check()`. From the documentation, `timeout` means the
  time limit for running `R CMD check` on one version of one package (#42).
- Deduplicate post-install commands in the system requirements script
  to prevent redundant execution of identical post-install hooks (#41).

## revdeprun 0.5.0

### Improvements

- Resolve the Ubuntu system requirements of all CRAN reverse dependencies with
  `pak::pkg_sysreqs()` and run the installation with post-installation commands
  before running revdepcheck (#35).
- Provision Quarto and TinyTeX with `PATH` updates by default so `.qmd` and PDF
  vignettes can render during reverse dependency checks (#34).

## revdeprun 0.4.0

### Bug fixes

- Increased the `revdepcheck::revdep_check()` timeout to 12 hours to
  accommodate longer installation and reverse dependency checks (#25).
  Keep using the source package mirror so that revdepcheck can run (#28, #30).

### Improvements

- Provision `pandoc` by default so R package vignettes can build during
  reverse dependency checks (#26).
- Set `revdepcheck::revdep_check(bioc = FALSE)` to follow the default
  behavior of `revdepcheck::cloud_check()` on **not** checking Bioconductor
  packages by default (#20).
- Set `revdepcheck::revdep_check(quiet = TRUE)` to suppress the package
  installation outputs (#21).

## revdeprun 0.3.0

### Speed optimization

- `revdep.rs` now sets `options(Ncpus = workers)` so the dependency compilation
  phase can also use all available CPU cores (#12).

### Compact terminal output

- Progress for R and R package installation, workspace preparation, and
  repository cloning is now presented with compact spinners
  using `indicatif` (#13).
  - Suppress revdepcheck bootstrap logs from R dependency installation.
    They will only surface when something fails.
  - Once revdepcheck dependencies are bootstrapped, only the interactive
    `revdepcheck` session streams to stdout.

## revdeprun 0.2.0

### Improvements

- Install `libcurl4-openssl-dev` and `libssl-dev` automatically, which are required by
  openssl and curl, dependencies of revdepcheck (#4).

### Documentation

- Improved `README.md` for clarity (#5, #6).

## revdeprun 0.1.0

### New features

- Initial public release of the `revdeprun` CLI.
- Automated Ubuntu R installer using the R-hub version resolution API.
- Implemented workflow that clones an R package repository and runs
  revdepcheck with configurable worker numbers.
- Support for custom workspaces, version overrides, and reusing pre-installed R.
