Closed mbannert closed 2 years ago
I'm going to say that devtools actively discourages explicit inclusion and manual management of a Date
field. It's better to just remove it and it will be generated at the right time, with correct data, without any effort on your part. I live a life completely free of even thinking about this field in the packages I maintain.
I will quote my colleagues on this one π π
https://twitter.com/jimhester_/status/1143335673535094784
PSA: just remove the date field entirely, R CMD build will add it for you automatically
https://twitter.com/hadleywickham/status/1143492132503719936
Actual PSA: Friends don't let friends use the Date field
Is your feature request related to a problem? Please describe. I'm always frustrated when I r-devel check everything for a CRAN submission and I forget to make sure the date field in DESCRIPTION is updated. Unfortunately, I submitted more than once with a date field older than a month and therefore got rejected with everything else fine, causing unnecessary for the CRAN team and frustration for myself.
Describe the solution you'd like I thought it would be cool if
submit_cran
would have warned me and prevented me from pushing up to CRAN. Something like adding the below code to https://github.com/r-lib/devtools/blob/56875888a507eedb1a92d820ff8c899e065e653c/R/release.R#L270would do the job.
Alternatively to checking
Sys.Date()
one could check some online date service.If desired I can create a PR, but thought raising the issue first makes sense.