r-lib / rcmdcheck

Run R CMD check from R and collect the results
https://rcmdcheck.r-lib.org
Other
115 stars 27 forks source link

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

Open MichaelChirico opened 3 months ago

MichaelChirico commented 3 months ago
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.

gaborcsardi commented 3 months ago

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.