Use rig in the setup-r action

Đang mở
#421 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
40/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, r, rust
Lĩnh vực
ci-cd, devops, tooling

Hướng nghiên cứu

Start with the r-lib/actions/setup-r action and its existing installer paths, then review the r-lib/actions test matrix for oldrel-4, devel, next, arm64, and containers. Compare the proposed opt-in installer: rig flow with the listed platform, Rtools, environment, and repository behavior; done means the opt-in path passes that matrix without regressing install-r: false or existing workflows.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Similar to #403, but for setup-r instead of setup-r-dependencies: what it would take for r-lib/actions/setup-r to install R with rig.

rig already does the core of what setup-r does (resolving the version, installing R, Rtools, links, repos, user library). Most of the remaining work is glue in the action. A possible plan is to ship it as an opt-in installer: rig input first, and switch the default later.

Background

rig already does the core of what setup-r does: resolving a version,
installing R, Rtools, quick links, and repos. The open question is what rig
itself is missing before setup-r could install R via rig instead of its own
three installers.

Missing rig features

  • --json output for rig add. Needed so the action can read back
    the installed version and path without a separate rig resolve --json /
    rig list --json call.
  • Windows install-dir override for admin mode. rig installs into
    C:\Program Files\R; setup-r and many existing workflows expect
    C:\R. Without an override, switching a workflow to rig is a breaking
    change for anything that hard-codes the old path.
  • A way to print/export Rtools environment info. rig add rtools
    installs Rtools and wires it into Renviron.site, but shell steps in a
    workflow also need Rtools on PATH, plus RTOOLSxx_HOME and
    _R_INSTALL_TIME_PATCHES_=no exported into the job environment. rig has
    no command to surface these values today.
  • rig add gfortran on macOS. setup-r downloads one of three
    gfortran/flang variants depending on R version and arch, plus sets
    SDKROOT. rig has no equivalent.
  • Extra repositories in rig repos setup. setup-r writes RSPM,
    CRAN, and extra-repositories into ~/.Rprofile. rig's repo setup only
    covers P3M and CRAN in the site profile; it needs a way to add extra repos
    (tracked together with the broader repos work in #403).
  • R_LIBS_USER. rig does not set this outside of rvenv projects, so
    whoever replaces setup-r's installer still needs to set it. Worth
    confirming on an actual runner whether rig should set a default here.

Compatibility gaps to check, not build

  • Version string parsing. setup-r special-cases inputs like 3,
    3.x, 4.x.x. Confirm rig resolve / rig add accept the same forms, or
    this mapping has to stay in the action.
  • Platform coverage vs. setup-r. Confirm how far back rig supports
    each OS (e.g. R 3.x on macOS and Windows), and whether rig handles the R
    3.6 P3M snapshot pin that setup-r currently applies.

Out of scope for rig (stays in the action regardless)

For reference, these are things setup-r does that are not rig's job and
would remain action-side glue even after the features above land:
qpdf/ghostscript/devscripts/checkbashisms installs, the addPath /
RTOOLS*_HOME export step itself, TZ / NOT_CRAN / RSPM /
RENV_CONFIG_REPOS_OVERRIDE env vars, and getting the rig binary onto the
runner.

What we gain

  • About 600 lines of installer code removed from the action: version resolution, the three installers, Rtools selection.
  • Multiple R versions in one job.
  • Windows arm64 and Rtools handling in one place.
  • Portable Linux builds for unsupported distros.
  • The same R setup in CI as users have locally.
  • Having rig on the runner is needed for #403 anyway.

Risks

  • Behavior changes affect many workflows. Ship as opt-in installer: rig, run both code paths through the r-lib/actions test matrix (oldrel-4, devel, next, arm64, containers), then switch the default.
  • Check how far back rig supports each platform (R 3.x on macOS and Windows) against what setup-r supports now. Also the R 3.6 P3M snapshot pin.
  • Pin the rig version in the action, so a rig release cannot break CI.
Ngôn ngữ chính
Rust
Star
1k
Fork
42
Merge trung bình
9 giờ 3 phút
Pull request đã merge (30 ngày)
18

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của r-lib/rig

Tất cả issue của r-lib/rig

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.