r-lib / usethis

Set up commonly used 📦 components

Home Page:https://usethis.r-lib.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: `use_version()` updates `Date` field in DESCRIPTION

d-morrison opened this issue · comments

I'm wondering whether it would make sense for the use_version() function to update the Date field in the DESCRIPTION file? Glad to attempt a PR if helpful.

We're intentional about not touching that field with our bare hands. The reasoning is explained in the R Packages book. It feels like it causes more grief than it prevents.

https://r-pkgs.org/description.html#other-fields

We discourage the explicit use of the Date field, as it is extremely easy to forget to update it if you manage Date by hand. This field will be populated in the natural course of bundling the package, e.g. when submitting to CRAN, and we recommend that you just let that happen.

Thanks for your reply! I agree that it's easy to forget to manually update; that's exactly why I was hoping it could be automated with use_version(). Leaving it to CRAN seems like a workable solution though!