Skip to content

rchk complaints #39

@astamm

Description

@astamm

While checking against rhub/rchk, it spots the following issues:

Function cpp11::detail::store::insert(SEXPREC*)
  [PB] has negative depth /github/home/R/x86_64-pc-linux-gnu-library/4.6/cpp11/include/cpp11/protect.hpp:302
  [UP] attempt to unprotect more items (2) than protected (0), results will be incomplete /github/home/R/x86_64-pc-linux-gnu-library/4.6/cpp11/include/cpp11/protect.hpp:302
  [PB] has possible protection stack imbalance /github/home/R/x86_64-pc-linux-gnu-library/4.6/cpp11/include/cpp11/protect.hpp:305

Function cpp11::writable::r_vector<double>::reserve_data(SEXPREC*, bool, long)
  [PB] has negative depth /github/home/R/x86_64-pc-linux-gnu-library/4.6/cpp11/include/cpp11/r_vector.hpp:1342
  [UP] attempt to unprotect more items (2) than protected (0), results will be incomplete /github/home/R/x86_64-pc-linux-gnu-library/4.6/cpp11/include/cpp11/r_vector.hpp:1342
  [PB] has possible protection stack imbalance /github/home/R/x86_64-pc-linux-gnu-library/4.6/cpp11/include/cpp11/r_vector.hpp:1343

Function cpp11::writable::r_vector<double>::resize_data(SEXPREC*, bool, long)
  [PB] has negative depth /github/home/R/x86_64-pc-linux-gnu-library/4.6/cpp11/include/cpp11/r_vector.hpp:1367
  [UP] attempt to unprotect more items (1) than protected (0), results will be incomplete /github/home/R/x86_64-pc-linux-gnu-library/4.6/cpp11/include/cpp11/r_vector.hpp:1367
  [PB] has possible protection stack imbalance /github/home/R/x86_64-pc-linux-gnu-library/4.6/cpp11/include/cpp11/r_vector.hpp:1368

Function cpp11::writable::r_vector<double>::resize_names(SEXPREC*, long)
  [PB] has negative depth /github/home/R/x86_64-pc-linux-gnu-library/4.6/cpp11/include/cpp11/r_vector.hpp:1389
  [UP] attempt to unprotect more items (1) than protected (0), results will be incomplete /github/home/R/x86_64-pc-linux-gnu-library/4.6/cpp11/include/cpp11/r_vector.hpp:1389

Full details here: https://github.com/tdaverse/phutil/actions/runs/14893316603/job/41830462913.

I filed r-lib/cpp11#456 with a possible fix.

In the meantime, I applied the fix by temporarily vendoring {cpp11} headers.

Now rchk does not complain anymore. {phutil} actually passes checks against all rhub platforms.
This is done in the branch called no-vignettes because rhub currently does not play nicely with quarto vignettes.

If you agree with this temporary vendoring {cpp11} idea, I can replicate that in the main branch which should put the package in good shape for a submission to CRAN.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions