ConesaLab/MOSim

Add 'codetools' to Suggests:

Closed this issue · 2 comments

Hello,

your package vignette relies indirectly(*) on the codetools package, which is a package that is not guaranteed to be installed on all systems; it's only a recommended package. Because of this, R CMD check on you package fails on such systems (see below).

(*) Searching the code of your package for codetools gives zero hits, which suggests that it codetools is used by another package that your package depends on, but only as a soft dependency. Because of this, you need to declare codetools as a dependency in your package.

To fix this, please add codetools to Suggests:, i.e.

Suggests:
    testthat,
    knitr,
    rmarkdown,
    BiocStyle,
    codetools

Example what happens when codetools is not installed:

* using R version 4.3.1 (2023-06-16)
* using platform: x86_64-pc-linux-gnu (64-bit)
...* checking re-building of vignette outputs ... ERROR
Error(s) in re-building vignettes:
  ...
--- re-building ‘MOSim.Rnw’ using knitr

Quitting from lines 245-271 [code6] (MOSim.Rnw)
Error: processing vignette 'MOSim.Rnw' failed with diagnostics:
there is no package called 'codetools'
--- failed re-building ‘MOSim.Rnw’

SUMMARY: processing the following file failed:
  ‘MOSim.Rnw’

Error: Vignette re-building failed.
Execution halted

Hi,

Thanks a lot for pointing this out! I have added codetools to Suggests and re-organized a bit the dependencies. I tested the build and R CMD check on a couple other servers and now it passes the check without problems. I hope it runs smoothly from now on!

Best wishes,
Carolina.

Thank you. FWIW, testing without codetools can be tricky because it's often installed with R itself and there's no setting in R telling R to hide it from itself. So, few people ever run into this in the first place. The reason why I did, is that we have an R installation that is minimal and therefore comes without codetools.