[Rd] Suggestions for improved checks on CRAN/R

Iñaki Ucar |uc@r @end|ng |rom |edor@project@org
Sat Aug 24 15:52:41 CEST 2019


Dear CRAN maintainers, R core team,

Here are some suggestions to prevent some issues I found in several
packages on CRAN. Some of these issues have been reported to their
maintainers, but still I believe it would be desirable to enforce
these on CRAN or in the corresponding R CMD.

- Checks for undeclared sysreqs. There are packages that do not
declare some system requirement. E.g., bioacoustics requires fftw and
soxr, but no sysreqs are declared; ijtiff links agains jpeg, but it's
not declared; there are a handful of packages linking against GSL and
not declaring it, such as BayesSAE, BayesVarSel, bnpmr...

Speaking of which... it would be *great* to have some standardization
in the way sysreqs are declared... But that's another story for
another day.

- Checks for buildroot path in the installed files. E.g., RUnit calls
system.file in man/checkFuncs.Rd, and as a result, the installed
manual contains the buildroot path, which should never happen. Another
example is TMB, but in this case the buildroot ends up in a binary
file, simple.so, that is compiled during the installation.

- Checks for incorrect NeedsCompilation. Some packages have this flag,
but nothing is compiled. E.g., reshape, analogueExtra, AGHmatrix...

- Checks for execution flags. The execution bit is enabled in many,
many files in many packages when it shouldn't (i.e., there's no
shebang). An example that comes to mind: Javascript files under "inst"
in shinyAce.

- Checks for incorrect versions in dependencies. E.g., rtweet depends
on magrittr >= 1.5.0, and abstractr depends on gridExtra >= 2.3.0. It
should be 1.5 and 2.3 respectively. This may not be important on CRAN,
because version comparisons still work in R, but this fails in other
systems, such as RPM packaging.

- Checks for top-level directories. I suppose there are some already
in place, but e.g., adapr has a zero-length file called "data" in the
sources. It seems that the installation command simply ignores it, but
it shouldn't be there.

Thanks for the already huge efforts to implement more thorough checks.
Hope this helps for the task.

Regards,
-- 
Iñaki Úcar



More information about the R-devel mailing list