13  Trouble shoot package builds

13.1 How often is data updated?

  • The system checks package Git repositories and the registry for changes every hour.
  • If changes are detected:
    • The workflow starts building the affected packages.
    • Upon completion, the packages are uploaded to R-universe.

13.2 Can the package build process be customized with custom options/tools/variables?

No, customization is not possible, except for addressing third-party system requirements (covered in the next section).
Think of R-universe as your own mini-CRAN. The build environment is very similar to CRAN’s, so if a package builds successfully on CRAN, it is likely to work on R-universe.

This restriction ensures that packages deployed on R-universe are reproducible, work seamlessly on user machines, and do not rely on custom settings or tools.

13.3 What if the Git repository is not a ready-to-build source package?

For repositories requiring additional preparation before building, you can add a script at the root of the package:

  • An R script named bootstrap.R, or
  • A shell script named .prepare.

These scripts will be executed before R CMD build.

Examples of actions performed by the script:

  • Initializing a Git submodule.
  • Running roxygen2 (if .Rd files are not committed to Git).
  • Performing other necessary preparations.

13.4 How to request additional third-party system requirements?

If packages need a Linux library that is not available on the server:

  1. Send a pull request (PR) to the base image for reasonably small or common dependencies.
  2. Alternatively, send a PR to rstudio/r-system-requirements to resolve the library based on the SystemRequirements field in the package DESCRIPTION file.

13.5 How to publish vignettes/articles requiring custom software/tokens to render?

Precompute these vignettes locally before publishing.
Follow the guide: How to precompute package vignettes or pkgdown articles.

13.6 Are packages on R-universe required to pass CMD check or meet other criteria?

No, R-universe is an open publishing system. It builds and deploys R packages from Git into personal CRAN-like repositories.

The universe owner is responsible for setting policies and ensuring quality control.

13.7 How to use a universe on regular continous integration?

If you want to test a package against versions of other packages that are in a universe, on GitHub Actions you can use the extra-repositories field of the r-lib/actions setup-r action.

13.8 How to know whether tests are run on R-universe?

During the build, the MY_UNIVERSE environment variable is set to the URL of the universe.