HenrikBengtsson / Wishlist-for-R

Features and tweaks to R that I and others would love to see - feel free to add yours!
https://github.com/HenrikBengtsson/Wishlist-for-R/issues
GNU Lesser General Public License v3.0
134 stars 4 forks source link

WISH: Standardized SystemRequirements #150

Open Enchufa2 opened 1 year ago

Enchufa2 commented 1 year ago

Background

Dependencies external to the R system should be listed in the ‘SystemRequirements’ field, possibly amplified in a separate README file. [from the Writing R Extensions manual]

The SystemRequirements field in the DESCRIPTION file effectively is a free text field, and therefore it is not (cannot be) properly checked nor enforced. As a result, this is the major source of pain for building and distributing R packages.

Proposal

CRAN could provide a publicly accessible database (much like tools::CRAN_package_db) of allowed system dependencies, with at least a standardized identifier, a description, and possibly system package names for major Linux distributions (as used by CRAN machines). See e.g. this.

Alternatively (and preferably), the SystemRequirements field could be left as a free text field to inform the user about optional run-time complex requirements and nice-to-have additional features and software, and the following new fields could be created to accommodate the standardized system dependencies described above:

That is, much like LinkingTo, Depends and Suggests, but for system dependencies. In this way, it would be trivial to query what's required, making the life of everyone (users, sysadmins, downstream packagers...) much easier.

Enchufa2 commented 1 year ago