Use rig in setup-r-dependencies

Open
#403 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
github-actions, r, rust
Domain
ci-cd, devops, tooling

Research direction

Start by reading the setup-r-dependencies integration described in the issue, then inspect src/pkgsource.rs:106, src/proj.rs:493, src/help/pkg-install.md, repos-plan.md, src/help/proj-import.md, and proj-lock.md. Run the existing relevant tests or CI workflows to identify one gap and its current failure. Done would require a scoped implementation with tests and working setup-rig-dependencies integration, but the issue lists multiple unresolved designs.

Written by the indexing model from the issue text.

Description

Gaps (roughly by importance)

  • #426
    No sysreqs lookup/install at all. pak's biggest CI feature.
    Needs: sysreqs DB (P3M sysreqs API or r-hub/r-system-requirements rules), distro
    detection (already exists for installing R), sudo handling, apt-get update.
  • #428
    No bioc:: refs, no Bioc repos, no Bioc-version-to-R-version mapping.
  • Configured / extra repositories. pkg and proj use only P3M/CRAN (help note in
    src/help/pkg-install.md, repos-plan.md). Missing: r-universe, drat, Additional_repositories,
    repos from setup-r's extra-repositories.
  • Config/Needs/<x> for rig pkg install. Only proj import reads them
    (src/proj.rs:493), and even there groups are "carried but not solved" per
    src/help/proj-import.md:41 (conflicts with proj-lock.md). CI needs --needs check,
    --needs website, etc.
  • pak ref syntax any:: and deps::. Not parsed (src/pkgsource.rs:106). Existing
    workflows use them everywhere; any::x could map to plain x, deps::path to
    --no-install-project path.
  • Finer dependency selection. Only hard vs --dev (Suggests + Enhances). pak allows
    "hard", TRUE, "all", explicit field lists, Config/Needs/*. Enhances are often
    unavailable; --dev may need --ignore-unavailable in CI where pak just works.
  • Lock-then-install split for caching. Need a stable resolution file to hash for the cache
    key (e.g. rig pkg install --dry-run --lockfile out.lock, then --from-lockfile), or a
    documented, cacheable rig cache dir (rig cache info --json path) as alternative.
    The resolution must be deterministic for the same inputs.
  • Working with the R that setup-r installs. setup-r uses its own installers
    (r-builds in /opt/R on Linux, CRAN pkg on macOS, CRAN exe on Windows); rig must find
    them, honor R_LIBS_USER set by the action, and work with system R (/usr/lib/R, e.g.
    rocker images) and in containers without sudo. Needs checking.
  • Upgrade semantics. rig always picks newest; pak default upgrade = FALSE keeps
    installed versions that satisfy constraints. Matters with restored caches and
    lockfile-create-lib.
  • GitHub auth. No GITHUB_PAT/GITHUB_TOKEN support; relies on git credentials.
    Fine for public repos; private Remotes: in CI need a token-to-git bridge.
  • Windows source builds. Relies on Rtools being present and found; confirm rig's
    R CMD INSTALL path works on GitHub runners.
  • Nice to have / could stay in the action: pandoc and quarto install, session info
    print (a rig pkg list with sources and versions table is close), failure log dumps
    (rig already points to _logs; CI wants the log printed inline).
  • The action itself. A setup-rig-dependencies (or new mode of the existing action)
    that wires rig + actions/cache together with the same inputs, so workflows switch
    with a one-line change.
Dominant language
Rust
Stars
1k
Forks
41
Avg merge
9h 33m
Merged PRs (30d)
17

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from r-lib/rig

All issues in r-lib/rig

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.