`rig proj add "<package>@ = <version>"` doesn't work with PPM

Open
#446 8 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
r, rust
Domain
cli

Research direction

Start by reproducing with rig proj add "glue@= 1.8.0" in a project whose rproj.toml lists the PPM repository, then check how the written constraint is parsed. The error reads glue >=1.8.0, <1.8.0, which suggests the exact pin is being turned into a bad range before the solver runs. Done means the pinned version resolves against PPM archive metadata and rproj.toml is updated; the discussion in the four comments should be read first to see whether maintainers have already diagnosed it.

Written by the indexing model from the issue text.

Description

Heya,

Apologies can't tell if this is a bug or an issue with PPM or just a misunderstanding on my behalf (apologies if the latter) but doesn't look like specific version pinning works with PPM repositories e.g.

[project]
name = "xxx-testing-rig"
version = "0.1.0"
type = "project"

[dependencies]
R = ">= 4.6"


[[repository]]
name = "mycran"
url = "https://packagemanager.posit.co/cran/latest"

[[repository]]
name = "cran"
enabled = false


[[repository]]
name = "bioc"
enabled = false
> rig proj add "glue@= 1.8.0"
✓ Added glue (= 1.8.0) to rproj.toml
▶ Reading dependencies from rproj.toml
▶ Downloading binary package metadata
▶ Solving dependencies for 4 targets
✗ Cannot resolve dependencies for R 4.6.1 / aarch64-apple-darwin:
  this project depends on glue >=1.8.0, <1.8.0
  No version of glue matches >=1.8.0, <1.8.0.
  Nearest available versions: 1.8.1 (above).
✗ Could not resolve the dependencies, rproj.toml unchanged

At least my understand was that PPM should have all the archive versions for older package versions so would have expected this to work. Again apologies if I'm doing something wrong.

Debug

> rig --version
RIG -- The R Installation Manager 0.11.0

MacOS Tahoe

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.