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 reporting on writes/updates to tools::R_user_dir() during checks #155

Open
HenrikBengtsson opened this issue Dec 12, 2023 · 1 comment

Comments

@HenrikBengtsson
Copy link
Owner

HenrikBengtsson commented Dec 12, 2023

Something like:

$ export _R_CHECK_THINGS_IN_USER_DIR_=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 (A), removed (R), or modified (M) files:
A 42b71ea60b7c385ad29633002f402f72 431B 2023-12-12T11:03:19 README.txt
* checking for detritus in the user config directory ... OK
* checking for detritus in the user data directory ... OK
* DONE

Status: OK

See also

This is not the solution to, but it's related to a discussion on running R CMD check with an already populated cache over that the Bioconductor #bioc-builds channel, cf. https://community-bioc.slack.com/archives/CEQ04GKEC/p1702394023260179?thread_ts=1701914888.153329&cid=CEQ04GKEC

@HenrikBengtsson
Copy link
Owner Author

HenrikBengtsson commented Dec 13, 2023

BLOCKER: It will be hard to discern writes/updates made by the R CMD check run from those that may occur from other R processes running on the same machine by the same user.

The only way to resolve this, is to use session-specific user folders. This can be achieved by setting R_USER_DATA_DIR, R_USER_CONFIG_DIR, and R_USER_CACHE_DIR (from ?tools::R_user_dir()) to temporary folders. This would in turn lead to all checks being run with empty file caches, etc.

@HenrikBengtsson HenrikBengtsson changed the title R CMD check: Option for reporting on writes/updates to tools::R_user_dir() during checks R CMD check: Option for testing with empty tools::R_user_dir() folders Dec 13, 2023
@HenrikBengtsson HenrikBengtsson changed the title R CMD check: Option for testing with empty tools::R_user_dir() folders R CMD check: Option for reporting on writes/updates to tools::R_user_dir() during checks Dec 13, 2023
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