This project ships a Rust CLI that provisions R on Ubuntu and automates reverse dependency checks for R packages.
src/lib.rsexposesrun(), which wires together argument parsing, workspace creation, R toolchain resolution and installation, repository preparation, and the finalxfun::rev_check()invocation.src/cli.rsusesclapfor argument parsing. Keep the CLI surface lean; new flags require corresponding documentation updates.src/r_version.rstalks tohttps://api.r-hub.io/rversions/resolve. Changes here must continue to support setup-r style shorthand (e.g.release,oldrel-1). Prefer blockingreqwestto avoid pulling tokio into the callsrc/r_install.rsdownloads the.deb, installs prerequisites, and creates/usr/local/binsymlinks withxshell. Assume Ubuntu-only environments.src/revdep.rsclones repositories, writes an install bootstrap R script, and invokesxfun::rev_check()after preinstalling binaries from Posit Package Manager. Keep both scripts deterministic and avoid editing user repositories outsiderevdep/. Only the interactivexfun::rev_check()phase should reach stdout.src/workspace.rsmanages workspace directories. Remote clones default to<repo>alongside the current working directory, while temporary files live underrevdeprun-work/. Respect user-provided workspaces without deleting their content.src/util.rsholds shared helpers; keep it small and well-tested.
- Tests (
cargo test) and doc tests should run on macOS and Linux without needing R. Avoid adding integration tests that require R installation. - Reuse
xshellfor shell calls instead ofstd::process::Commanddirectly. - Keep new dependencies minimal and compatible with the MSRV declared in
Cargo.toml. - If the revdep recipe changes, reflect it in
build_revdep_scriptand add a regression test that checks for critical fragments. - README changes must mirror CLI options and behavioral adjustments.
- Update
CHANGELOG.mdusing Keep a Changelog conventions.