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

R CMD check: Option for testing with empty tools::R_user_dir() folders #156

Open
HenrikBengtsson opened this issue Dec 13, 2023 · 0 comments

Comments

@HenrikBengtsson
Copy link
Owner

Issue

Some packages use a file cache, also during R CMD check. This means that the results with and without a file cache might differ. For an example of this, see Bioconductor Support thread 'autonomics: example("read_somascan", package = "autonomics") fails, but not on Bioc check servers' started on 2023-12-06 (https://support.bioconductor.org/p/9155535/).

Proposal

Make it possible to run R CMD check with session-specific, empty, temporary user folders, e.g.

$ export _R_CHECK_EMPTY_USER_DIRS_=true
$ R CMD check --as-cran R.cache_0.16.0.tar.gz
* using log directory ‘/home/henrik/tmp/R.cache.Rcheck’
* using R version 4.3.2 (2023-10-31)
...
  Running ‘textPrompt.R’
 OK
* checking PDF version of manual ... OK
* checking HTML version of manual ... OK
* checking for non-standard things in the check directory ... OK
* checking for detritus in the temp directory ... OK
* checking for detritus in the user cache directory ... NOTE
Found the following added files:
42b71ea60b7c385ad29633002f402f72 431B README.txt
* checking for detritus in the user config directory ... OK
* checking for detritus in the user data directory ... OK
* DONE

Status: OK

Comment: I just used the "checking for detritus ..." output to illustrate the example. Whether a package should clean out user folders when tested or not can be debated. It sounds overly complicated to me.

PS. This replaces FR #155, which is unrealistic to implement by itself.

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

1 participant