Skip to content

Fail fast when requested R version is not installed - #104

Merged
t-kalinowski merged 5 commits into
mainfrom
fail-fast-missing-r-version
Jun 18, 2026
Merged

t-kalinowski merged 5 commits into
mainfrom
fail-fast-missing-r-version

Conversation

@t-kalinowski

@t-kalinowski t-kalinowski commented Jun 18, 2026 •

Copy link
Copy Markdown
Member

Summary

When an explicit R version is requested and no installed R matches, fail directly from the installed R list instead of querying rig available --json.

This keeps the missing-version path simpler and avoids an unnecessary external lookup that can obscure the actual error. It also makes short exact-version requests behave as series requests: == 4 means 4.*.*, and == 4.4 means 4.4.*, selecting the latest installed matching version rather than treating omitted components as 0.

User-facing changes

  • ir run --r-version <version> now reports a missing installed R directly when no installed version matches.
  • --r-version 4 and --r-version "== 4" select an installed 4.x, choosing the latest matching installed version.
  • --r-version "== 4.4" selects an installed 4.4.x, choosing the latest matching patch when multiple patches are installed.
  • Short series specs still succeed with an older matching installed version when that is the only matching installed R.
  • If no installed matching series exists, the error remains direct and does not query rig available --json.
  • exclude-newer behavior is unchanged and still uses R availability metadata where needed.

Internal changes

  • Added helper setup for fake installed R binaries in rig_selection tests.
  • Added named CLI tests for major-series and minor-series selection with:
    • multiple installed matching versions
    • only one installed matching version
    • installed versions from other series only
  • Added CLI regression coverage proving the missing explicit version path does not call rig available --json.
  • Added a small helper for deriving rig install hints from bare and == R version requirements.

@t-kalinowski
t-kalinowski marked this pull request as ready for review June 18, 2026 01:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a1ae1d1e5e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/rig/r_selection.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 22c19f4810

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/rig/r_selection.rs
@t-kalinowski
t-kalinowski merged commit 0415f14 into main Jun 18, 2026
4 checks passed
@t-kalinowski
t-kalinowski deleted the fail-fast-missing-r-version branch June 18, 2026 12:08
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