rcmdcheck icon indicating copy to clipboard operation
rcmdcheck copied to clipboard

rcmdcheck fails to build anytime from GitHub clone with inst/doc removed

Open MichaelChirico opened this issue 1 year ago • 1 comments
trafficstars

setwd(tempdir())
system("git clone --depth 1 https://github.com/cran/anytime")

system("R CMD build anytime")
# works with warning about vignettes having been rebuilt
# Warning: ‘inst/doc’ files
#     ‘anytime-introduction.Rnw’, ‘anytime-introduction.pdf’
#   ignored as vignettes have been rebuilt.
#   Run R CMD build with --no-build-vignettes to prevent rebuilding.

rcmdcheck::rcmdcheck("anytime") # prompts about presence of inst/doc
unlink("anytime/inst/doc", recursive=TRUE)
rcmdcheck::rcmdcheck("anytime")

The full log is quite the mess from BH, I didn't manage to parse through & see what's wrong.

I suppose the reason rcmdcheck() requires inst/doc removed beforehand is due to the warning R CMD build throws, but for my use case (see also #224), it shouldn't really matter. So maybe the path forward (and possibly also solving #224?) is to expose a way to build in the presence of inst/doc, ignoring the warning.

MichaelChirico avatar Aug 18 '24 05:08 MichaelChirico

cran/anytime contains a source R package, i.e. it was already built with R CMD build. You don't need to call R CMD build on it. If you want rcmdcheck to skip the build step, call it on a tarball.

gaborcsardi avatar Aug 18 '24 07:08 gaborcsardi