usethis icon indicating copy to clipboard operation
usethis copied to clipboard

Use existing R versions for minimum required version

Open Bisaloo opened this issue 2 months ago • 1 comments

usethis::use_data() automatically adds a minimum required R version:

https://github.com/r-lib/usethis/blob/9e64daf13ac1636187d59e6446d9526a414d8ba6/R/data.R#L47-L51

But these version numbers do not correspond to any actual R version. In practice, this adds a dependency to R (>= 2.10.0) / R (>= 3.5.0).

This can cause issues when programmatically passing this version number to downstream tools (e.g., to lintr::backport_linter(), or to find the release date with the rversions R package). Instead of a single equality comparison, we now have to find the first version which matches an inequality comparison.

Is it possible to edit these lines to add the patch version number (.0)? As far as I can tell, it is a fully backwards-compatible change, since it only makes the de facto current behaviour explicit.

I'm happy to submit a PR for this if you agree with this minor change.

Bisaloo avatar Apr 03 '24 09:04 Bisaloo