[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-devel
Subject:    Re: [Rd] Should a package that indirectly Suggests: a vignette engine pass R CMD check?
From:       Prof Brian Ripley <ripley () stats ! ox ! ac ! uk>
Date:       2014-06-14 14:31:33
Message-ID: 539C5CC5.8020102 () stats ! ox ! ac ! uk
[Download RAW message or body]

On 14/06/2014 13:54, Duncan Murdoch wrote:
> On 14/06/2014, 7:48 AM, Martin Morgan wrote:
>> A package uses VignetteEngine: knitr; the package itself does not Sugges=
ts:
>> knitr, but it Suggests: BiocStyle which in turn Suggests: knitr. Nonethe=
less, R
>> CMD check fails indicating that a package required for checking is not d=
eclared.
>> Is it really the intention that the original package duplicate Suggests:=
 knitr?
>
> Yes.  The VignetteEngine setting requires that knitr be available for
> building and checking, but it doesn't imply how.  You need to also
> declare knitr in one of the other ways (Depends, Suggests, etc.).
>
> It would be possible to change the checks so that a dependency of a
> dependency was sufficient, but a suggestion of a suggestion would not
> be. You can pass a check without having the Suggests of BiocStyle
> present, because checking your package doesn't require doing anything
> with BiocStyle that would need its suggestions.  However, I don't think
> it's worth complicating the check code to support this.  If you need
> knitr to be present to build your vignettes, why not just declare it
> explicitly?

This is just checking what 'Writing R Extensions' requires:

'As Sweave is the only engine supplied with the R distribution, the =

package providing any other engine must be specified in the =

=91VignetteBuilder=92 field of the package DESCRIPTION file, and also =

specified in the =91Suggests=92, =91Imports=92 or =91Depends=92 field (sinc=
e its =

namespace must be available to build or check your package).'

Note the 'must be' ... it is a requirement.  And various parts of the =

software in various versions of R (there have been quite a few variants) =

have relied on this.  For example, it is optionally possible to do =

build/check without Suggests present (and always without Suggests of =

Suggests) and then in some versions some of files intended to be =

non-Sweave vignettes were silently ignored.

>
> Duncan Murdoch
>
>>
>> This is only with a recent R. In detail, with
>>
>> $ Rdev --version|head -3
>> R Under development (unstable) (2014-06-14 r65947) -- "Unsuffered Conseq=
uences"
>> Copyright (C) 2014 The R Foundation for Statistical Computing
>> Platform: x86_64-unknown-linux-gnu (64-bit)
>>
>> trying to  check the Bioconductor genefilter package leads to
>>
>> $ Rdev --vanilla CMD check genefilter_1.47.5.tar.gz
>> * using log directory =91/home/mtmorgan/b/Rpacks/genefilter.Rcheck=92
>> * using R Under development (unstable) (2014-06-13 r65941)
>> * using platform: x86_64-unknown-linux-gnu (64-bit)
>> * using session charset: UTF-8
>> * checking for file =91genefilter/DESCRIPTION=92 ... OK
>> * this is package =91genefilter=92 version =911.47.5=92
>> * checking package namespace information ... OK
>> * checking package dependencies ... ERROR
>> VignetteBuilder package not declared: =91knitr=92
>>
>> See the information on DESCRIPTION files in the chapter =91Creating R
>> packages=92 of the =91Writing R Extensions=92 manual.
>>
>> I interpret this to mean that knitr should be mentioned in Suggests: or =
other
>> dependency field. The package does not Suggests: knitr, but it does Sugg=
ests:
>> BiocStyle, which itself Suggests: knitr. The author knows that they are =
using
>> the BiocStyle package for their vignette, and the BiocStyle package sugg=
ests the
>> appropriate builder.
>>
>> Martin Morgan
>>
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


-- =

Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic