From edd at debian.org  Mon Apr  4 19:35:59 2016
From: edd at debian.org (Dirk Eddelbuettel)
Date: Mon, 4 Apr 2016 12:35:59 -0500
Subject: [Rd] Suggested dependencies in context of R CMD check
In-Reply-To: <CABdHhvFX_24SAtgMCJ7peK6dw57LThq+gPoWKu6CFFQXgpL5yw@mail.gmail.com>
References: <CABE2sp6n5eOD4-O-kL50XT0CAo6P2K_QR+f=4A51r7drk609Gw@mail.gmail.com>
	<CABdHhvFX_24SAtgMCJ7peK6dw57LThq+gPoWKu6CFFQXgpL5yw@mail.gmail.com>
Message-ID: <22274.42495.805158.436137@max.nulle.part>


On 4 April 2016 at 07:25, Hadley Wickham wrote:
| On Sat, Apr 2, 2016 at 5:33 AM, Jan G?recki <J.Gorecki at wit.edu.pl> wrote:
| 
| In principle, I believe a package should pass R CMD check if no
| suggested packages are installed. However, since this is not currently

The relevant manual says

     The 'Suggests' field uses the same syntax as 'Depends' and lists
  packages that are not necessarily needed.  This includes packages used
  only in examples, tests or vignettes (*note Writing package
  vignettes::), and packages loaded in the body of functions.  E.g.,
  suppose an example(1) from package *foo* uses a dataset from package
  *bar*.  Then it is not necessary to have *bar* use *foo* unless one
  wants to execute all the examples/tests/vignettes: it is useful to have
  *bar*, but not necessary.  Version requirements can be specified, and
  will be used by 'R CMD check'.

and later

   * All packages that are needed(2) to successfully run 'R CMD check'
     on the package must be listed in one of 'Depends' or 'Suggests' or
     'Imports'.  Packages used to run examples or tests conditionally
     (e.g. _via_ 'if(require(PKGNAME))') should be listed in 'Suggests'
     or 'Enhances'.  (This allows checkers to ensure that all the
     packages needed for a complete check are installed.)

| automatically checked, many packages will fail to cleanly pass R CMD
| check if suggested packages are missing.

I consider that to be a bug in those 'many packages'.  It essentially takes
away the usefulness of having a Suggests: to provide a more fine-grained
dependency graph.

So I am with Jan here.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



[Rd] Suggested dependencies in context of R CMD check
Dirk Eddelbuettel