`rig proj add <pkg>` gives contradictory messages if the package cannot be found

Open
#464 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
r, rust
Domain
cli, tooling

Research direction

The two contradictory lines are the Added foobar (*) to rproj.toml success message and the rproj.toml unchanged failure message, both printed by rig proj add when dependency solving fails. Find where the add step writes to rproj.toml and where the solver's failure path rolls it back, then reproduce with a nonexistent package name. Done means the output either reports the add only after a successful solve, or describes the rollback accurately, with no contradictory lines on failure.

Written by the indexing model from the issue text.

Description

> rig proj init
[ truncated]

> rig proj add foobar
✓ Added foobar (*) to rproj.toml          # <<<<<<<< "Added to toml"
▶ Reading dependencies from rproj.toml
▶ Downloading binary package metadata
▶ Solving dependencies for 5 targets
✗ Cannot resolve dependencies for R 4.6.1 / x86_64-unknown-linux-gnu-ubuntu-24.04:
  Package foobar is not available on CRAN or Bioconductor 3.23.
✗ Could not resolve the dependencies, rproj.toml unchanged              # <<<<<<<< "toml unchanged"
Dominant language
Rust
Stars
1k
Forks
41
Avg merge
9h 33m
Merged PRs (30d)
17

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from r-lib/rig

All issues in r-lib/rig

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.