Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WISH: Standardized SystemRequirements #150

Open
Enchufa2 opened this issue Aug 31, 2023 · 1 comment
Open

WISH: Standardized SystemRequirements #150

Enchufa2 opened this issue Aug 31, 2023 · 1 comment

Comments

@Enchufa2
Copy link

Enchufa2 commented Aug 31, 2023

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.

  • Then, the SystemRequirements field could be standardized as a comma-separated list of the identifiers above, with optional version specification, as in Depends, Imports and so on.
  • R CMD check should check for the correctness of this field.
  • CRAN checks should run in isolated environments (e.g. via docker) just with the specified system requirements. In this way, checks would just fail if there are undeclared dependencies.

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:

  • SystemLinkingTo: A set of build-time system dependencies.
  • SystemDepends: A set of run-time system dependencies.
  • SystemSuggests: A set of optional run-time system dependencies.

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
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants