Dan Tenenbaum
2014-Jul-11 23:49 UTC
[Rd] proposed change of check message when VIgnetteBuilder package is not declared as a dependency
Hi,
I notice in R-3.1.1, if a package specifies a VignetteBuilder (such as knitr) in
its DESCRIPTION file, but
does not also depend on the specified package (in either Depends, Imports, or
Suggests), that R CMD check will say:
* checking package dependencies ... ERROR
VignetteBuilder package not declared: ?knitr?
I'm glad this situation is now caught by R CMD check, but I think the
message text should be changed, because the message is confusing. Indeed, the
VignetteBuilder package *was* declared, in the VignetteBuilder line. The problem
is that there's no dependency on it, so no automated way to install it for
building or checking.
Can the message instead say something like:
Package 'knitr' must be in Depends, Imports, or Suggests field of
DESCRIPTION file.
?
A possible patch against trunk:
$ svn diff
Index: src/library/tools/R/QC.R
==================================================================---
src/library/tools/R/QC.R (revision 66127)
+++ src/library/tools/R/QC.R (working copy)
@@ -3056,7 +3056,7 @@
if(length(bad <- x$required_for_checking_but_not_installed) > 1L) {
c(.pretty_format2("VignetteBuilder packages required for
checking but not installed:", bad), "")
} else if(length(bad)) {
- c(sprintf("VignetteBuilder package required for checking but
installed: %s", sQuote(bad)), "")
+ c(sprintf("Package %s must be in Depends, Imports, or Suggests
field of DESCRIPTION file.", sQuote(bad)), "")
},
if(length(bad <- x$missing_vignette_depends)) {
c(if(length(bad) > 1L) {
Thanks,
Dan
Brian Diggs
2014-Jul-14 15:07 UTC
[Rd] proposed change of check message when VIgnetteBuilder package is not declared as a dependency
On 7/11/2014 4:49 PM, Dan Tenenbaum wrote:> Hi, > > I notice in R-3.1.1, if a package specifies a VignetteBuilder (such > as knitr) in its DESCRIPTION file, butdoes not also depend on the > specified package (in either Depends, Imports, or Suggests), that R > CMD check will say: > > * checking package dependencies ... ERROR > VignetteBuilder package not declared: ?knitr? > > I'm glad this situation is now caught by R CMD check, but I think > the message text should be changed, because the message is confusing. > Indeed, the VignetteBuilder package *was* declared, in the > VignetteBuilder line. The problem is that there's no dependency on it, > so no automated way to install it for building or checking. > > Can the message instead say something like: > > Package 'knitr' must be in Depends, Imports, or Suggests field of > DESCRIPTION file. > > ? You shouldn't leave out the information that the package in question is being mentioned because it is declared in VignetteBuilder. I would suggest something more like: VignetteBuilder package 'knitr' must be in Depends, Imports, or Suggests field of DESCRIPTION file. -- Brian S. Diggs, PhD Senior Research Associate, Department of Surgery Oregon Health & Science University
Maybe Matching Threads
- Suggested Patch: Adding commas to list of packages after R CMD check
- Suggested Patch: Adding commas to list of packages after R CMD check
- vignette index going AWOL
- VignetteBuilder: Unlike other package fields, it does not support version specifiers
- packages with Sweave and knitr vignettes?