Problem
GitHub Actions builds with renv can take 35+ minutes when RSPM (Posit Public Package Manager) doesn't have binaries for packages in the lockfile. This happens when lockfile contains bleeding-edge package versions that RSPM hasn't synced yet.
Compiling R packages from source on Linux is slow. RSPM provides pre-built binaries that install in seconds.
Proposed Solution
Add ngr_rspm_* functions to check lockfile compatibility with RSPM and optionally sync:
# Check which packages in lockfile don't match RSPM available versions
ngr_rspm_check <- function(lockfile = "renv.lock") {
# Returns data.frame of mismatches: package, lock_version, rspm_version
}
# Downgrade mismatched packages to RSPM-compatible versions
ngr_rspm_sync <- function(mismatches) {
# Installs RSPM versions and updates lockfile
}
Use Case
- Run
ngr_rspm_check() in CI before build
- If mismatches found, either warn or auto-sync
- Trade-off: slightly older packages vs 30+ min faster builds
TODO
Relates to NewGraphEnvironment/mybookdown-template#78
Relates to NewGraphEnvironment/sred-2025-2026#3
Problem
GitHub Actions builds with renv can take 35+ minutes when RSPM (Posit Public Package Manager) doesn't have binaries for packages in the lockfile. This happens when lockfile contains bleeding-edge package versions that RSPM hasn't synced yet.
Compiling R packages from source on Linux is slow. RSPM provides pre-built binaries that install in seconds.
Proposed Solution
Add
ngr_rspm_*functions to check lockfile compatibility with RSPM and optionally sync:Use Case
ngr_rspm_check()in CI before buildTODO
ngr_rspm_check()ngr_rspm_sync()Relates to NewGraphEnvironment/mybookdown-template#78
Relates to NewGraphEnvironment/sred-2025-2026#3