`rig pkg install` doesn't show why a package failed when the error happens before `R CMD INSTALL` (e.g. permission denied on the library)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start in src/install.rs at the r_cmd_install() error handling and the install task and main loop links in the issue. Trace how pre-install errors are returned and reported, then compare with the existing R CMD INSTALL failure message. Done when a package’s underlying error and relevant path appear in the normal failure output, including when dependent packages are skipped.
Written by the indexing model from the issue text.
Description
When a package fails to install because of an error before R CMD INSTALL runs, rig pkg install does not say why. The output only has the final count, and the underlying error (here Permission denied) is only visible with -v.
rig 0.11.1 (rig-linux-x86_64-0.11.1.tar.gz), Ubuntu 24.04.
To reproduce, with a library directory the current user cannot write to:
sudo mkdir lib
rig pkg install --library ./lib cli
Installing 1 packages.
[INFO] Installing 1 packages in dependency order with max_concurrent=8
[INFO] Installing package cli from /home/user/.cache/rig/packages/src/cli_3.6.6-f4a1deb1.tar.gz to ./lib
[ERROR] Installation completed: 0 succeeded, 1 failed
Error: Installation completed with 1 failures (0 succeeded)
With rig -v, there is one more line:
[2026-11-05T16:55:00Z DEBUG src/install.rs:838] Install task completed with error for cli: Permission denied (os error 13)
Even then, the path it could not write to is not shown.
With several packages it is harder to follow, as the dependents are reported but not the root failure. This is from our CI on GitHub Actions, where the library was most likely owned by root after a rig proj sync (#503):
[INFO] Installing package htmltools from /home/runner/.cache/rig/packages/src/htmltools_0.5.9.9000-90a5dee5.tar.gz to /home/runner/work/project/tests/.rvenv/lib
[ERROR] Skipping package rmarkdown because a dependency failed
[ERROR] Skipping package bslib because a dependency failed
[ERROR] Skipping package fontawesome because a dependency failed
[ERROR] Skipping package sass because a dependency failed
[INFO] Installing package xfun from /home/runner/.cache/rig/packages/bin/linux/noble-x86_64/4.6/xfun_0.62-4783e8b7.tar.gz to /home/runner/work/project/tests/.rvenv/lib
[ERROR] Skipping package tinytex because a dependency failed
[ERROR] Installation completed: 0 succeeded, 7 failed
Error: Installation completed with 7 failures (0 succeeded)
Nothing says that htmltools and xfun failed, nor why.
From what I can tell, an R CMD INSTALL failure is reported (Failed to install <pkg> with the log path), but any error returned earlier with ? in r_cmd_install(), for example creating <library>/_logs, only reaches the debug!() in the install task, and the main loop drops it:
https://github.com/r-lib/rig/blob/c9df020f02a8b0ab43ccca1f5963700a46800868/src/install.rs#L569-L570
https://github.com/r-lib/rig/blob/c9df020f02a8b0ab43ccca1f5963700a46800868/src/install.rs#L934-L940
https://github.com/r-lib/rig/blob/c9df020f02a8b0ab43ccca1f5963700a46800868/src/install.rs#L983-L985
I tested 0.11.1 only. I see that dc3f23c improved the failure summary on main, but reading the code it looks like these errors are still only logged at debug level there. Please correct me if I'm reading it wrong.
I expected rig to print the error for the package that failed, e.g. Failed to install cli: Permission denied (os error 13) with the path, like it does for an R CMD INSTALL failure.
- Dominant language
- Rust
- Stars
- 1k
- Forks
- 41
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 13
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from r-lib/rig
-
bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 66/100
r-lib/rig#484 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Repository typesOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Proposal: add rig proj renv migrate and improve renv importPossibly taken A pull request linked to this issue is open or already merged. Openfeature
Difficulty 5/5 Over a week Newbie friendliness 15/100
Maintainers usually reply within 1 day
Similar issues
-
bug: merge_insert does not detect concurrent inserts of the same FixedSizeBinary primary keyPossibly taken @lance-gatefixer claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
lance-format/lance#10811 ·
Maintainers usually reply within 2 days
-
provider testing
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
mishraprafful/multihull#234 ·
Maintainers usually reply within 1 day
-
comp-documentation
Difficulty 1/5 Under an hour Newbie friendliness 84/100
ClickHouse/ClickHouse#129829 ·
Maintainers usually reply within 1 day
-
bug needs triage python
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
state:needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
zed-industries/zed#66628 ·
Maintainers usually reply within 1 day