Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

proj lock generates invalid URLs with exclude-newer for source packages that P3M lists with a `Path:`

Aperta
#484 1 commento 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
66/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend

Direzione di ricerca

Start by locating the rig proj lock code that builds source package URLs from the P3M PACKAGES index, then trace how it handles the Path: field when exclude-newer selects a snapshot. Compare the generated URL with the working example in the issue and run the relevant lock or sync tests. Done means source URLs include the indexed subdirectory when needed and the reported sync no longer gets a 404.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Hi, and thanks for rig and rig proj, which I have been enjoying a lot!

I noticed that a lock file can generate illegal URLS when exclude-newer for source packages that have in the P3M index entry a Path: field. I think rig writes a source URL without that path, which 404s.

rig version: 0.11.0 (macOS, arm64)

Minimal example

rproj.toml:

[project]
name = "bug"
version = "0.1.0"
type = "project"

[dependencies]
R = ">= 4.6"
Rcpp = "*"

[tool.rig]
exclude-newer = "2026-01-14"
$ rig proj lock
$ rig proj sync
...
✗ Failed to download https://p3m.dev/cran/2026-01-08/src/contrib/Rcpp_1.1.0.8.2.tar.gz, status: 404 Not Found
✗ All download URLs failed.

What I found

The PACKAGES index of that snapshot lists the package with a Path: field:

Package: Rcpp
Version: 1.1.0.8.2
Path: 4.6.0/Other
Depends: R (>= 4.6)

The file is not in src/contrib/ but in the subdirectory named by Path::

$ curl -sI -o /dev/null -w "%{http_code}\n" https://p3m.dev/cran/2026-01-08/src/contrib/Rcpp_1.1.0.8.2.tar.gz
404
$ curl -sI -o /dev/null -w "%{http_code}\n" https://p3m.dev/cran/2026-01-08/src/contrib/4.6.0/Other/Rcpp_1.1.0.8.2.tar.gz
200

Potential confounding factor

When I remove the exclude-newer line from rproj.toml, then the lock file is all well and I can successfully sync it. Yet, the URLs are also without the extra Path: 4.6.0/Other. Nevertheless, those URLS do now exist in the package manager.

$ cat rproj.lock
...
[[targets.packages]]
package = "Rcpp"
version = "1.1.2"
binary = false
platform = "source"
dependencies = []
sources = ["https://p3m.dev/cran/2026-07-06/src/contrib/Rcpp_1.1.2.tar.gz"]
target = "src/Rcpp_1.1.2-0af8c486.tar.gz"
groups = ["main"]
metadata = { RemoteHash = "2746cf2fb188e5f0a84dbf5c8f68915b54564ed33e5754572f174e7b32e7f4f3" }
...
Lingua principale
Rust
Stelle
1k
Fork
39
Merge medio
18h 5m
PR unite (30g)
25

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di r-lib/rig

Tutte le issue di r-lib/rig

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.