Skip to content

feat(r-rig)!: v2 full rewrite - #284

Merged
eitsupi merged 2 commits into
mainfrom
r-rig-v2
Oct 22, 2026
Merged

eitsupi merged 2 commits into
mainfrom
r-rig-v2

Conversation

@eitsupi

@eitsupi eitsupi commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Close #283

A full rewrite of the r-rig Feature as v2.0.0 (breaking changes).

Changes

  • Install arf instead of radian via the new arfVersion option (none by default, latest, or a version like 0.6.0).
    The release asset is downloaded from GitHub releases and verified with its sha256 checksum. Requires glibc >= 2.34.
  • Python is no longer used.
  • vscodeRSupport
    • minimal: processx, later, jsonlite and rstudioapi (dependencies of sess, the session watcher of vscode-R 3.x) instead of jsonlite and rlang
    • lsp: minimal + languageserver
    • full: lsp + jgd (instead of httpgd)
  • Removed options: installRadian, installVscDebugger, installJupyterlab and pandocVersion (use the pandoc Feature instead; it is added to installsAfter).
  • pak's automatic system requirements installation is no longer disabled (--without-sysreqs is not used).
    At build time, the system requirements are installed in two phases so that R packages are still installed into the user's library:
    1. The user runs pak::pkg_sysreqs() and writes the install commands into a user-owned temporary directory.
      The build fails if this step fails.
    2. Root copies the commands to a root-owned file and runs them.
    3. The user installs the R packages with PKG_SYSREQS=false.
  • Temporary directories are created with mktemp -d and removed on exit.
  • The hard-coded apt package lists are removed (system requirements are handled by pak).
  • R version resolution is left to rig. Major-only versions such as 4 are resolved via rig available (the newest version that rig resolve returns a download URL for).
  • Use the new rig release asset names (rig-linux-<arch>-latest.tar.gz).
  • NOTES.md is rewritten, including a migration guide from v1.
  • Test scenarios are rewritten.

- Install arf instead of radian (new `arfVersion` option); Python is no longer used
- Install jgd instead of httpgd, and the sess dependencies for vscode-R 3.x
- Remove `installRadian`, `installVscDebugger`, `installJupyterlab` and `pandocVersion` options
- Enable pak's automatic system requirements installation; at build time,
  system requirements are installed by root and R packages by the user
- Let rig resolve R versions (major-only versions are resolved via `rig available`)

Close #283
@eitsupi
eitsupi marked this pull request as ready for review October 22, 2026 03:30
- Fail the build when `pak::pkg_sysreqs()` fails instead of ignoring the error
- Do not run a script from a world-writable directory as root;
  root copies the commands generated by the user to a root-owned file before running them
- Use randomly named temporary directories (`mktemp -d`) and remove them on exit
- Check that `rig resolve` returns a download URL when resolving a major-only R version
@eitsupi
eitsupi merged commit 6c45877 into main Oct 22, 2026
16 of 25 checks passed
@eitsupi
eitsupi deleted the r-rig-v2 branch October 22, 2026 03:53
eitsupi added a commit that referenced this pull request Oct 22, 2026
Follow-up of #284. Aligns the r-apt Feature's options with r-rig v2 (v1.0.0, breaking change).

## Changes

- Install arf instead of radian via the new `arfVersion` option (same as r-rig v2: `none` by default, `latest`, or a version like `0.6.0`; verified with its sha256 checksum; requires glibc >= 2.34).
- Python is no longer used.
- `vscodeRSupport`
  - minimal: r-cran-processx, r-cran-later, r-cran-jsonlite and r-cran-rstudioapi (dependencies of sess, the session watcher of vscode-R 3.x) instead of r-cran-jsonlite and r-cran-rlang
  - lsp: minimal + r-cran-languageserver
  - full: lsp + r-cran-jgd (instead of r-cran-httpgd)
  - On Debian, languageserver and jgd are not available via apt, so they are installed from CRAN.
- Removed options: `installRadian`, `installVscDebugger` and `installJupyterlab`.
- On Debian with `useTesting: true`, renv is installed via apt (r-cran-renv is available in Debian testing).
- NOTES.md is updated, including a migration guide from 0.x.
- Test scenarios are updated, and the jupyter check is removed from the `r-apt_quarto` global scenario.
eitsupi added a commit that referenced this pull request Oct 22, 2026
…lt (#286)

Follow-up of #284. Applies the same system requirements installation as r-rig v2 to the r-packages Feature (v2.0.0, breaking change).

## Changes

- `installSystemRequirements` now defaults to `true`.
- System requirements are installed in two phases, so that it does not depend on `sudo` being available at build time:
  1. The user runs `pak::pkg_sysreqs()` (after `pak::repo_add()`) and writes the install commands into a user-owned temporary directory.
     The build fails if this step fails.
  2. Root copies the commands to a root-owned file and runs them.
     The commands are generated by pak for the platform, so non-apt platforms supported by pak keep working.
  3. The user installs the R packages with `PKG_SYSREQS=false`, then runs `pak::cache_clean()` and `pak::meta_clean(force = TRUE)`.
- The R code is run from script files, and the environment variables (`NOT_CRAN`, `PKG_CRAN_MIRROR`, etc.) are set explicitly in the `su` command.
  `additionalRepositories` is passed to R via a root-owned file to avoid quoting problems.
- Temporary directories are created with `mktemp -d` and removed on exit.
- NOTES.md is updated, including a migration guide from v1.
- New test scenarios for the default (sysreqs on) with a non-root user and for `installSystemRequirements: false`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[r-rig] Full rewrite

1 participant