Skip to content

[R-pkg-devel] Package used unconditionally only in testing

3 messages · Greg Freedman Ellis, Henrik Bengtsson, Dirk Eddelbuettel

#
I guess my worry is that my upstream dependencies will break something
without knowing it because the tests won't fail unless httptest is
installed. I really wish there was a way to indicate dependencies for
testing purposes only.

(And, oops, you're right, I meant that I was considering including httptest
in Imports not Depends)
On Fri, Jan 8, 2021 at 12:04 PM David Bosak <dbosak01 at gmail.com> wrote:

            

  
  
#
R CMD check --as-cran will give an ERROR if not all Suggest:ed
packages are installed and available when it runs.

/Henrik
On Fri, Jan 8, 2021 at 11:25 AM Greg Freedman Ellis <gdfermail at gmail.com> wrote:
#
On 8 January 2021 at 11:32, Henrik Bengtsson wrote:
| R CMD check --as-cran will give an ERROR if not all Suggest:ed
| packages are installed and available when it runs.

This can be overridden with R_CHECK_FORCE_SUGGESTS_=false which may be
helpful if Suggests: has a long tail of dependencies, or a shorter test run
is desired.

The R Internals manual describes the variable as 

  '_R_CHECK_FORCE_SUGGESTS_'
       If true, give an error if suggested packages are not available.
       Default: true (but false for CRAN submission checks).

which highlights the different behaviour under --as-cran and without.

Dirk