Repository navigation
Install missing R versions with rig in user mode - #158
Draft
t-kalinowski wants to merge 2 commits into
Draft
t-kalinowski wants to merge 2 commits into
t-kalinowski wants to merge 2 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IR can now use rig to install a missing R version in user mode. If no R selector is supplied and
Rscriptis absent fromPATH, it selectsrelease. 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-newerminor-version limits, then installed in rig's default or configured directories. These installations persist outside IR's cache and surviveir cache clean. Installation leaves the default R and shell PATH unchanged; explicit--rscriptandIR_RSCRIPTselections 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-defaultand--without-pathflags 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.shpassed: rustfmt, Clippy with warnings denied, and all 234 tests.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 survivingir cache clean.