Transition to sugar length checks (#1513): affected packages

Aperta
#1,517 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp, r
Ambito
tooling

Direzione di ricerca

This is a tracking checklist; the work lives in the linked downstream repositories, not in Rcpp itself. Pick one unchecked package, read its linked PR or issue, and reproduce the length mismatch in the cited line, using the Rcpp #1513 development branch. Done means the package builds against both CRAN Rcpp 1.1.2 and the #1513 branch, and its results are no longer silently truncated.

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

Descrizione

PR #1513 (closing #1512) makes Rcpp sugar check that the operands of an expression, and a vector assigned into a matrix row, column or Range subset, have matching lengths. Released Rcpp sizes the result by the left-hand operand (or the target) and silently truncates the longer side, so code with mismatched lengths ran without complaint; in several cases below it also produced wrong results.

The reverse dependency run of 2026-10-06 (summarised here) gives '3302 successes, 29 failures, 60 skipped'. Of the failures, twelve are packages that trip the new check, each at a single site:

Error: sugar operands have different lengths (N1 and N2)
Error: cannot assign a vector of length V to a target of length T

This issue regroups the required work on those packages. Note that the checks are compiled in only for development versions of Rcpp (four version components, which is what the reverse-dependency runs use); releases leave them off and behave as before, so none of these packages will break on CRAN when Rcpp is released. The fixes are still worth making, since in several cases the old results were wrong. The fixes are one line in ten cases, and each has been sent upstream as a PR or, where no repository could be found, as a patch by email. In the two remaining cases the old results were affected and the maintainer should own the change, so an issue was filed instead. Fixed packages build against both the CRAN version 1.1.2 and the #1513 branch.

Help is definitely welcome. If you maintain one of these packages, or can nudge its maintainer, please do.

Individual packages:

See full list.

NB: Two other failures in that run were on our side and are not covered by this ticket: touch (a compile error in lapply(), fixed in #1513) and revdbayes (an object layout change in #1511 that broke the XPtr call from rust, since reworked). The ConsTree 'illegal operation' (and the long-standing TreeTools, TreeDist and TreeSearch failures) come from an unconditional inline-asm popcnt in TreeTools' SplitList.h, which faults on CPUs without POPCNT such as VMs with a generic CPU model; reported at ms609/TreeTools#287 with a fix at ms609/TreeTools#288. The remaining failures were pre-existing, missing dependencies, or unrelated to Rcpp per the run summary.

Lingua principale
C++
Stelle
796
Fork
217
Merge medio
1g 12h
PR unite (30g)
2

Preparare l'ambiente

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 RcppCore/Rcpp

Tutte le issue di RcppCore/Rcpp

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.