Let `cran` and `bioc` be mapped to another server, e.g. an internal PPM
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by tracing how --with-repos, rproj.toml, and rproj.lock handle cran and bioc, then follow how package history and downloads choose a server. The proposal’s done criteria are mapped URLs recorded in the lockfile and package downloads coming from the configured server, with the specified PPM and CRAN-mirror behavior.
Written by the indexing model from the issue text.
Description
Problem
Many organizations point R's cran at an internal Posit Package Manager (PPM) or a CRAN mirror. In rig:
--with-repos cran=<URL>fails with "already a repository of the project, with another URL", because the built-incranentry has no URL.- A
cranorbiocentry inrproj.tomlcannot take aurl. - Adding the server under another name and setting
crantoenabled = falseworks for solving, because acranorppm-cranrepository replaces the built-in feed. Butrepository = "cran"pins,--without-repos=cran, and the meaning ofcraninrproj.lockthen refer to the wrong thing. - Binaries are always downloaded from public P3M, whatever server the user configured. This breaks air-gapped installs and ignores the user's choice of server.
Proposal
-
Allow
--with-repos cran=<URL>(andbioc=<URL>), andurl = "..."on acranorbiocentry. This would mean "this is CRAN", andrproj.lockwould record the mapped URL. The current error stays for any other name that already exists with a different URL. -
The type of the mapped server would be detected as usual, or set with
type. -
rig would keep downloading the public package history from https://ppm.r-pkg.org (and https://ppm-bioc.r-pkg.org) unless
extend = falseis set. The history is only used to decide what to install; it is not where packages are downloaded from. -
Downloads always come from the server the user named:
- For a PPM, binaries come from the server's own
bin/linux/<distro>-<arch>/<R minor>/URLs, includingArchive/paths and dated snapshots. A source tarball served at a binary URL is detected and built from source (see #461). - For a CRAN mirror or another CRAN-like repository, rig never falls back to P3M, for binaries or for sources. Binaries come only from what the repository itself publishes (the
bin/indexes for macOS and Windows), so Linux installs are from source. If the repository does not have a package version that the metadata lists, rig reports an error, instead of fetching it from somewhere else.
Today a CRAN source package is downloaded from the mirror first and from PPM if the mirror does not have it. A mapped
cranshould not do that. - For a PPM, binaries come from the server's own
- 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
- 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
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
.Renviron activation in rig proj: handling project secrets and Posit Assistant restrictionsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
speakeasy-api/speakeasy#2159 ·
Maintainers usually reply within 1 day
-
documentation target:powerpoint
Difficulty 1/5 Under an hour Newbie friendliness 76/100
tomast1337/PdfLapas#602 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day