Open goldingn opened 5 years ago
Awesome detailed discussion of this issue here: https://community.rstudio.com/t/determining-which-version-of-r-to-depend-on/4396
I think the (imperfect) static code analysis approach would be a good target for the unconf
It looks like the apicheck package would be really useful here. This package would just need to determine which functions and arguments from the packages are used in the target package.
There's also a good post there by jumping rivers (Colin Gillespie)
https://www.jumpingrivers.com/blog/what-r-version-do-you-really-need-for-a-package/
Issue idea credit to: @robbie90, as suggested in the day 0 unconf training
When creating an R package, we need to decide what is the earliest version of R we should depend on. I.e. how up-to-date must a user's R version be before they can install and use this package.
One option is to depend on the current release of R, but then people need to update their R installation before they can install the package (so might not bother with the package), and the package might work just fine on earlier versions.
Another option is to check and test the package on earlier versions of R, and see which is the earliest version that works. But that's really hard and time consuming!
We could write a package to help work out the earliest version that will work. The package could:
The last of these approaches might be quite tricky, slow, and limited to recent-ish versions of R but could potentially leverage rhub or some other remote build system.