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

check support for _R_CHECK_*_ONLY_ env vars? #2225

Closed
tdhock opened this issue May 13, 2020 · 3 comments
Closed

check support for _R_CHECK_*_ONLY_ env vars? #2225

tdhock opened this issue May 13, 2020 · 3 comments

Comments

@tdhock
Copy link

tdhock commented May 13, 2020

https://cloud.r-project.org/doc/manuals/r-release/R-exts.html#Suggested-packages says

On most systems, R CMD check can be run with 
only those packages declared in ‘Depends’ 
and ‘Imports’ by setting environment variable 
_R_CHECK_DEPENDS_ONLY_=true, 
whereas setting _R_CHECK_SUGGESTS_ONLY_=true
 also allows suggested packages, 
but not those in ‘Enhances’ nor those not mentioned
 in the DESCRIPTION file. It is 
recommended that a package is checked with 
each of these set, as well as with neither. 

so I was wondering if support for these options could be added to devtools::check?
I ask because devtools::check already supports the similar option:

force_suggests: Sets _R_CHECK_FORCE_SUGGESTS_. If FALSE (the
          default), check will proceed even if all suggested packages
          aren't found.
@jimhester
Copy link
Member

You can supply additional environment variables to use during the check with the env_vars variable, e.g. devtools::check(env_vars = c(_R_CHECK_DEPENDS_ONLY_="true"))

I don't really want to go down the road of adding additional arguments for every environment variable available to tweak R CMD check, as there are a lot of them.

@tdhock
Copy link
Author

tdhock commented May 14, 2020

ok thanks for the info, that is fine to only support a few of the env vars as arguments.

@tdhock tdhock closed this as completed May 14, 2020
@samuel-rosa
Copy link

You will have to use:

 devtools::check(env_vars = c(`_R_CHECK_DEPENDS_ONLY_` = TRUE))

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

No branches or pull requests

3 participants