-
Notifications
You must be signed in to change notification settings - Fork 73
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
Empty cache directories are not deleted #1118
Comments
|
Thanks for the update. Can you detail how you used {styler} in order to end up with this result? Because I can’t reproduce this running R CMD Check. If you invoked styler in other ways than R CMD Check, e.g. interactively, cache files are written by default but should be removed after 6 days in compliance with the CRAN policy. That was even the case before version 1.10.0. What’s new with this release is that, the empty, version dependent folder (e.g. /Users/ripley/Library/Caches/org.R-project.R/R/R.cache/styler/1.10.0) as well as it’s parent folder are deleted with The R.cache cache root (/Users/ripley/Library/Caches/org.R-project.R/R/R.cache) can’t be deleted by {styler} as it always contains a README.md managed by {R.cache} and I don’t think it’s {styler}’s responsibility to manage it anyways. Lorenz Walthert |
CRAN reply:
I did not. The update script ran R CMD check, and also checked those depending on styler (in alphabetical order) I see this also on my Linux server. In both cases the file times are not all close together so not from a single R session: ls -ltr /Users/ripley/Library/Caches/org.R-project.R/R/R.cache/styler/1.10.0 and all are empty files. styler itself was checked at around 19:41. I have just re-checked styler: that added -rw-r--r-- 1 ripley staff 0 25 May 09:02 b9b163f367a2d53ad88c5691bea3a492.Rcache but did not remove yesterday's files. I am not sure how you can claim
6 days is not in the CRAN policy, and last time I reported files that had not be accessed in a month. If I only run styler once a month, the files will remain for that month.
That is not what I have been reporting. "The time of the volunteers is CRAN’s most precious resource" |
Summary
cc: @krlmlr |
More results from my investigation: There is a test that clears the styler cache (test-zzz.R, line 9) that should clear the cache, if there is any. If the test environment is not CRAN, we also check if the directory is empty and error if not. These tests passed CI always. I activated the cache and styled a file to populate the cache. Then:
Revdepcheck also said there was one for {shinymeta}:
This seem not to exist on CRAN and maybe that means revdepcheck does not give us reliable results. That's all I have for now. |
After installing the most recent R version and all packges required in my local debugging environment, I am able to reproduce the CRAN behaviour. The cache was not deactivated in all vignettes and my suspiction is that in previous R versions, the enviornment from testing was used, where the cache was deactivated explicitly. So this problem was not related to the {styler} update, but the R update on the CRAN infrastructure. The caches should be deactivated in all vignettes now as introduced in #1124 and the package was submitted to CRAN again. |
(On macoS as their directories are reported as zero size):
du -h /Users/ripley/Library/Caches/org.R-project.R/R
0B /Users/ripley/Library/Caches/org.R-project.R/R/dipsaus/file_locks
0B /Users/ripley/Library/Caches/org.R-project.R/R/dipsaus
0B /Users/ripley/Library/Caches/org.R-project.R/R/R.cache/styler/1.9.1
0B /Users/ripley/Library/Caches/org.R-project.R/R/R.cache/styler
0B /Users/ripley/Library/Caches/org.R-project.R/R/renv/sandbox/R-4.4-r84396/aarch64-apple-darwin22.4.0/d88109f6
0B /Users/ripley/Library/Caches/org.R-project.R/R/renv/sandbox/R-4.4-r84396/aarch64-apple-darwin22.4.0
0B /Users/ripley/Library/Caches/org.R-project.R/R/renv/sandbox/R-4.4-r84396
0B /Users/ripley/Library/Caches/org.R-project.R/R/renv/sandbox
0B /Users/ripley/Library/Caches/org.R-project.R/R/renv
The CRAN policy says
"packages may store user-specific data, configuration and cache files in their respective user directories obtained from tools::R_user_dir(), provided that by default sizes are kept as small as possible and the contents are actively managed (including removing outdated material)."
so these empty dirs should have have been removed. For renv this seems to be from some user package, so if this could be encouraged in documentarian that would be good.
For dipsaus and styler, please correct before 2023-06-02 to safely retain your packages on CRAN.
The text was updated successfully, but these errors were encountered: