Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMove the markdown package from Imports to Suggests #1864
Comments
… package containing vignettes based on the knitr::knitr engine
|
hi I got this from win-builder:
my vignette uses
which I think does not require markdown (even in suggests), if I understand your discussion above correctly. so it seems strange that I would need to add markdown in suggests. do I really have to? |
|
Yes, you have to. |
|
ok |
|
I think I'm getting a false positive warning on the CRAN Winbuilder. I've got all my vignettes set to %\VignetteEngine{knitr::rmarkdown}If I have not set in
I'm getting no warnings locally (
The missing package, however, is |
|
@mschubert I need a reproducible example. Could you provide a link to your package (presumably on Github?)? Thanks! |
|
Package was |
|
@mschubert In your case, you are using the vignette engine |
|
Yes, that's what I tried to say - sorry if that was not clear. My comment was that the error message of "missing Perhaps a better error message would be to add whatever markdown builder you use to |
|
@mschubert Yes, I definitely agree the messages were confusing in this case. I'll think more about it and try to make it clearer. Thanks a lot for your feedback! |
Experienced the following in winbuild * checking re-building of vignette outputs ... [1s] WARNING Error(s) in re-building vignettes: --- re-building 'introduction.Rmd' using rmarkdown Warning in engine$weave(file, quiet = quiet, encoding = enc) : The vignette engine knitr::rmarkdown is not available, because the rmarkdown package is not installed. Please install it. Error: processing vignette 'introduction.Rmd' failed with diagnostics: The 'markdown' package should be declared as a dependency of the 'tableone' package (e.g., in the 'Suggests' field of DESCRIPTION), because it contains vignette(s) built with the 'markdown' package. Please see yihui/knitr#1864 for more information. --- failed re-building 'introduction.Rmd' --- re-building 'smd.Rmd' using rmarkdown Warning in engine$weave(file, quiet = quiet, encoding = enc) : The vignette engine knitr::rmarkdown is not available, because the rmarkdown package is not installed. Please install it. Error: processing vignette 'smd.Rmd' failed with diagnostics: The 'markdown' package should be declared as a dependency of the 'tableone' package (e.g., in the 'Suggests' field of DESCRIPTION), because it contains vignette(s) built with the 'markdown' package. Please see yihui/knitr#1864 for more information. --- failed re-building 'smd.Rmd' SUMMARY: processing the following files failed: 'introduction.Rmd' 'smd.Rmd' Error: Vignette re-building failed.
|
I agree with @mschubert. I had the same situation. I was about to add 'markdown' to suggests because of the message, when I really should have added 'rmarkdown' to suggests, because I use |
…the vignette engine knitr::rmarkdown is used (#1864)
* creating vignettes ... ERROR --- re-building 'dataRetrieval.Rmd' using rmarkdown Warning in engine$weave(file, quiet = quiet, encoding = enc) : The vignette engine knitr::rmarkdown is not available because the rmarkdown package is not available. Did you forget to add it to Suggests in DESCRIPTION? Please see yihui/knitr#1864 for more information. Loading required namespace: sf --- finished re-building 'dataRetrieval.Rmd'
|
With knitr 1.30 (the current latest version on CRAN), the message should tell you to add |
Base64 encoding no longer depends on markdown: 76fef5b
The next step is to notify package authors who use R Markdown vignettes based on the vignette engine
knitr::knitr(orknitr::docco_linear,knitr::docco_classic, etc.) that they should declare the (soft) dependency on markdown, e.g., in the package DESCRIPTION:Previously they didn't need to do this because markdown is a hard dependency of knitr (in
Imports), so the availability of markdown is guaranteed by knitr, but I want to make markdown a soft dependency of knitr in the future.Historically, I made markdown the hard dependency of knitr at the request of a BioConductor maintainer. I have regretted this decision for long.
I think most packages use the vignette engine
knitr::rmarkdownto write vignettes now, but there may still be a few vignettes using theknitr::knitrengine, which depends on markdown. If I move markdown toSuggestsin knitr, users have to make sure markdown is available toR CMD check. To achieve that, they have to add markdown toSuggeststo theirDESCRIPTIONfiles.If you are a package author affected by this issue, but not clear about what you need to do, please reply below and I'll be glad to help. Thanks!