r-lib / devtools

Tools to make an R developer's life easier
https://devtools.r-lib.org
Other
2.39k stars 759 forks source link

build vignette time stamp flagged by CRAN #1348

Closed brry closed 7 years ago

brry commented 8 years ago

On CRAN checks, I get the WARNING: Files in the 'vignettes' directory newer than all files in 'inst/doc'. Windows cmd > R CMD build berryFunctions creates a tar.gz with the same time stamp for both files. Rstudio > devtools::build() creates a tar.gz where vignettes/berryFunctions.Rmd is consistently exactly one second newer than inst/doc/berryFunctions.Rmd

Rstudio, devtools and all packages are up to date. The vignette is fairly long and has also been rebuild with devtools::build_vignette() just yesterday, just in case that matters somehow. The package is at github.com/brry/berryFunctions.

> devtools::session_info()
Session info ------------------------------
 setting  value                       
 version  R version 3.3.1 (2016-06-21)
 system   x86_64, mingw32             
 ui       RStudio (0.99.903)          
 language (EN)                        
 collate  German_Germany.1252         
 tz       Europe/Berlin               
 date     2016-09-21                  

Packages ----------------------------
 package    * version date       source        
 devtools     1.12.0  2016-06-24 CRAN (R 3.3.1)
 digest       0.6.10  2016-08-02 CRAN (R 3.3.1)
 memoise      1.0.0   2016-01-29 CRAN (R 3.3.1)
 rstudioapi   0.6     2016-06-27 CRAN (R 3.3.1)
 withr        1.0.2   2016-06-20 CRAN (R 3.3.1)
gergness commented 8 years ago

Sorry if this is unrelated, but I had a similar issue, but running R CMD from the command line didn't help. To fix, I had to delete the files in inst/doc and then recreate them with build_vignette().

schloerke commented 7 years ago

hafen/packagedocs found that deleting the whole inst/doc folder before calling devtools::build() worked around the issue.

hadley commented 7 years ago

Yeah, you generally shouldn't be including inst/docs in your submission. I'll look into this whole workflow and figure out what's going wrong.

stefvanbuuren commented 7 years ago

This is my approach to circumvent the time stamp problem:

devtools::build_vignettes()
devtools::build(vignettes = FALSE)
brry commented 7 years ago

I do not have the problem anymore. Change date for vignettes/bF.Rmd is 2016-10-13 21:55, while in inst/doc/bF.Rmd its 2017-01-16 12:38.

I do not get CRAN warnings anymore, presumably they relaxed the test... So for me, this is not a significant problem anymore. If CRAN is happy, I am happy ;-)

In the generated tar.gz file, the vignettes/.Rmd now is 3 seconds newer than the (derivated) inst/doc/.Rmd file.

stefvanbuuren commented 7 years ago

Yes, build_vignettes() is fine, but build() appears to touch files. CRAN is (again?) unhappy with that.

gaborcsardi commented 7 years ago

I guess build() copies everything over to a temporary directory, and then the file modification dates are updated. It should be possible to copy over the files without changing the modification dates.

hadley commented 7 years ago

I have never seen this problem so I'm not sure what's different with your workflows. Do you have files in inst/doc before submitting?

lock[bot] commented 6 years ago

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/