From dtenenba at fredhutch.org  Fri Apr  3 01:33:38 2015
From: dtenenba at fredhutch.org (Dan Tenenbaum)
Date: Thu, 2 Apr 2015 16:33:38 -0700 (PDT)
Subject: [Rd] request: check version requirements of Suggests package during
 R CMD build if install required
In-Reply-To: <1595441362.1047554.1428017435605.JavaMail.root@fredhutch.org>
Message-ID: <550567055.1047562.1428017618917.JavaMail.root@fredhutch.org>

Hello,

Say a package (call it pkgA) has this in its DESCRIPTION file:

Suggests: foo (>= 1.2.3)

And yet I only have version 1.2.2 of foo installed, which does not include coolFunction(). pkgA's vignette has this code chunk:

library(foo)
coolFunction()

When I run R CMD build on my package, it will fail, saying that coolFunction() could not be found, but I would prefer it say (like it does in R CMD check):

Package required and available but unsuitable version: 'foo'

This only needs to happen (and only should happen) if R CMD build determines that it needs to install the package (i.e. there is a vignette or there are R expressions in man pages).

I understand that Suggests is sort of a catch all and the package may be used in examples, not in the vignette at all. But the reason for my request is that the error message about coolFunction() being missing seems misleading and doesn't tell me what I really need to do, whereas the proposed message would. 

And if I ran R CMD check first I would know what to do, but I typically run build first, and more importantly, so does the Bioconductor build system, so a package developer looking at our build report would never see the more informative message.

Then R-exts section 1.1.3 would also need to be updated from:

"The ?Suggests? field .... Version requirements can be specified, and will be used by R CMD check (and R CMD build, if package installation is necessary)."

Thanks,
Dan



[Rd] request: check version requirements of Suggests package during R CMD build if install required
Dan Tenenbaum