Skip to content

[R-pkg-devel] R-devel warning: You used a knitr feature that depends on the digest package.

5 messages · David Scott, Gábor Csárdi, Martin Maechler +2 more

#
On a package I help maintain, we had a note from Kurt about a warning 
when building vignettes on R-devel.

It was

Warning: You used a knitr feature that depends on the digest package.

Checking the location of the error and googling it, I am pretty certain 
it comes from cache = true for a chunk in the vignette.

Adding digest as suggested package, I got no warning from winbuilder 
using R-devel, but submitting to https://builder.r-hub.io gave me a new 
warning from codetools at the same location as previously. Like digest, 
codetools is suggested by knitr.

Any advice? One thought is just take off cache = true.

David Scott
#
codetools is a recommended package, and it is part of most R
installations. builder.r-hub.io is a bit more strict, it does have the
recommended packages, on some builders at least, so codetools might be
missing.

Gabor
On Tue, Feb 6, 2018 at 7:22 PM, David Scott <d.scott at auckland.ac.nz> wrote:
#
> codetools is a recommended package, and it is part of most R
    > installations. builder.r-hub.io is a bit more strict, it does have the
    > recommended packages, on some builders at least, so codetools might be
    > missing.

    > Gabor

hmm... but a package maintainer has to also add recommended
packages to 'Suggests' if they are needed in the vignette (e.g.)
> On Tue, Feb 6, 2018 at 7:22 PM, David Scott <d.scott at auckland.ac.nz> wrote:
>> On a package I help maintain, we had a note from Kurt about a warning when
    >> building vignettes on R-devel.
    >> 
    >> It was
    >> 
    >> Warning: You used a knitr feature that depends on the digest package.
    >> 
    >> Checking the location of the error and googling it, I am pretty certain it
    >> comes from cache = true for a chunk in the vignette.
    >> 
    >> Adding digest as suggested package, I got no warning from winbuilder using
    >> R-devel, but submitting to https://builder.r-hub.io gave me a new warning
    >> from codetools at the same location as previously. Like digest, codetools is
    >> suggested by knitr.

well, but  "suggests of suggests are not suggests":
If your vignette really needs codetools you (your package
DESCRIPTION) need to suggest it yourself.

    >> Any advice? One thought is just take off cache = true.

well, yes ;-) ..
Seriously, of course rather fix the problem, which must be
fixable relatively easily.

Martin
#
On Wed, 7 Feb 2018, Martin Maechler wrote:

            
The problem is that this is an indirect dependency with knitr needing
digest and codetools to implement a feature (cacheing) that is being
asked for. And there is no obvious way (to me at least) of finding out
that these are needed for this feature. If knitr marked these as
Depends rather than Suggests there would be no problem. Depends seems
more in line with the extensions manual that Suggests in this case.

Best,

luke

  
    
1 day later
#
On 7 February 2018 at 15:03, luke-tierney at uiowa.edu wrote:
| The problem is that this is an indirect dependency with knitr needing
| digest and codetools to implement a feature (cacheing) that is being
| asked for. And there is no obvious way (to me at least) of finding out
| that these are needed for this feature. If knitr marked these as
| Depends rather than Suggests there would be no problem. Depends seems
| more in line with the extensions manual that Suggests in this case.

There are more examples.  A vignette of mine used a popular plotting package
and some its standard examples -- which deploy mgcv::gam() to smooth, and of
course without testing if mgcv was available.  Which promptly blows up in a
stringent CRAN test of vignette dependencies.

Something used _unconditionally_ is not a Suggests.

Dirk