Skip to content

Install missing R versions with rig in user mode - #158

Draft
t-kalinowski wants to merge 2 commits into
mainfrom
feat/rig-user-installations
Draft

t-kalinowski wants to merge 2 commits into
mainfrom
feat/rig-user-installations

Conversation

@t-kalinowski

Copy link
Copy Markdown
Member

IR can now use rig to install a missing R version in user mode. If no R selector is supplied and Rscript is absent from PATH, it selects release. This lets IR start with rig alone, without an existing R installation.

IR reuses a matching installed R before downloading and retains the existing selector precedence. Missing versions are resolved using the same version requirements and exclude-newer minor-version limits, then installed in rig's default or configured directories. These installations persist outside IR's cache and survive ir cache clean. Installation leaves the default R and shell PATH unchanged; explicit --rscript and IR_RSCRIPT selections remain authoritative.

Internally, IR reads user installations and available releases through rig's JSON output, excludes development builds from broad requirements, checks returned numeric versions, and reports rig failures directly. Public CLI regressions cover installation, reuse, no-R startup, ranges, snapshot dates, Quarto selection, and failure handling. Documentation and the quickstart snapshot describe the new behavior.

This is a draft because automatic installation requires the --no-default and --without-path flags from r-lib/rig#490, currently available in development rig 0.11.1-dev rather than released rig 0.11.0. Existing installed-version selection still works with older rig.

Validation:

  • NEXTEST_TEST_THREADS=2 scripts/check.sh passed: rustfmt, Clippy with warnings denied, and all 234 tests.
  • Red/green public CLI regressions; all 44 selection and installation tests pass.
  • Native macOS arm64 smoke tests with rig 17bcb7f: fresh temporary homes, no Rscript on PATH, automatic R 4.6.1 installation with jsonlite, explicit frontmatter R 4.4.3 installation, and reuse on second invocation. Confirmed rig's default directories, unchanged default R and shell profiles, and R installations surviving ir cache clean.
  • Native run/render selection test passed with the installed rig 0.10.0 and R 4.4.3.
  • Independent source review completed; no remaining findings. Linux and Windows were not tested locally.

This branch has not been deployed

No deployments
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.

1 participant