Suggested dependencies in context of R CMD check
Asked Answered
M

0

6

Are suggested dependencies mandatory in context of R CMD check when using env var _R_CHECK_FORCE_SUGGESTS_=FALSE?

Suggested dependencies are nice because are optional.
But that feature often isn't valid when trying to run R CMD check on them.
I would like to use export _R_CHECK_FORCE_SUGGESTS_=FALSE, which according to the comment in tools/R/check.R#L3989:L3994

The suggested packages are required for a complete check.
Checking can be attempted without them by setting the environment variable _R_CHECK_FORCE_SUGGESTS_ to a false value.

should be sufficient to run check process without installing suggested deps.
If it is not true, then how to differentiate the suggested packages which are optional from those mandatory?
It would be helpful to have kind of vignetteBuilder DESCRIPTION field called testChecker, so DESCRIPTION file could precisely manage packages dependencies.
That way batch checking packages would be easier, as required dep metadata would be at hand in description file. Batch checking rev-dep pkgs with all their suggests will simply result into testing whole CRAN.

I've handled in the code with if (requireNamespace(.)) test_package(.) for testthat and knitr, also with mocking up .Rout files.

But I'm interested into canonical design of a suggested package and _R_CHECK_FORCE_SUGGESTS_ env var.
Is there any R core dev team recommendation/suggestion on that?

Minimus answered 2/4, 2016 at 1:6 Comment(4)
The place to ask whether R Core has opinions on such matters is [email protected]. I'd say that only a small fraction of R Core read SO.Selfinduction
Yea, the distinction between Depends/Imports and Suggests is the former are needed to build/install/load and the latter are needed in other contexts (examples and tests checked by R CMD check). If they're really only suggestions unused in tests or examples, then they are actually probably "Enhances" or should just be put in the Description.Signorino
This is truly bad. Either to manage (for each package) which suggested deps are needed to run tests, or just installing all suggests for each package. There are 100+ packages to process... This is design gap of a testing packages in R :/Minimus
mailing list on that issue: stat.ethz.ch/pipermail/r-devel/2016-April/072526.htmlMinimus

© 2022 - 2024 — McMap. All rights reserved.