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

NOTE detritus in the temp #49

Closed
christophsax opened this issue Mar 24, 2021 · 8 comments
Closed

NOTE detritus in the temp #49

christophsax opened this issue Mar 24, 2021 · 8 comments

Comments

@christophsax
Copy link
Collaborator

@eddelbuettel, I have a problem with seasonal on CRAN M1mac, where it complains about detritus in temp directory:

https://www.stats.ox.ac.uk/pub/bdr/M1mac/seasonal.out

I saw that I indeed write to tempdir() without cleaning up, but I cannot recreate the the check result, even on an M1 mac. I tried with _R_CHECK_THINGS_IN_TEMP_DIR_=true but no success.

Now I see that x13binary has the same issue:

https://www.stats.ox.ac.uk/pub/bdr/M1mac/x13binary.out

* checking for detritus in the temp directory ... NOTE
Found the following files/directories:
  ‘Rtmp41Q’ ‘RtmpqmD’

Here, indeed, we write to tempdir() without cleanup:

file.copy(system.file("testdata", "Testairline.spc", package="x13binary"), tdir)

This would be easy to fix, but would that help? Also, do you have any idea how to recreate the NOTE on any system?

I got a CRAN ultimatum for seasonal, so this is probably something we need to solve. Thanks a lot!

@krlmlr
Copy link
Contributor

krlmlr commented Mar 24, 2021

Yeah, I guess we need on.exit(unlink(file.path(tdir, x13.bin))) (and not forget to use add = TRUE in the subsequent on.exit() calls).

@eddelbuettel
Copy link
Contributor

Or be even more explicit and assign a tempfile() at the start of example and simply remove at end which can always be hidden in a \dontshow{} segment.

Do you known if it comes from examples or tests? Have you tried r-devel with --as-cran?

@eddelbuettel
Copy link
Contributor

I do not get it in seasonal under r-devel (but I don't have all optional packages installed so maybe not all code paths get opened). The Dept of Commerce website gets opened which is a bit ... weird.

Same in x13binary. Cannot reproduce locally (yet).

@eddelbuettel
Copy link
Contributor

I propose to replace tdir <- tempdir() (which just gets us the temporary directory of the current session, which we cannot nuke) with dir.create(tdir <- tempfile()) which is what I use elsewhere. And then at end we remove that tdir recursively. PR to x13binary in a minute or two.

@eddelbuettel
Copy link
Contributor

@christophsax if you review / approve the PR I can make a new x13binary release.

Which will show if the suggested fix works at CRAN....

@christophsax
Copy link
Collaborator Author

Super! I call x13binary::checkX13binary() on startup of seasonal, so every package that loads seasonal has this problem.

@eddelbuettel
Copy link
Contributor

Yes, from a glance a the seasonal code it is not clear where it would create them -- so makes some sense that the call to x13binary did this by oversighgt. Oops. Should be better soon, hopefully.

@eddelbuettel
Copy link
Contributor

Still waiting for the package to proceed through CRAN. Has been in state 'pretest' for the whole day -- maybe Uwe's machines are ill or something...

edd@rob:~$ cranIncoming.r x13binary        # wrapper for foghorn package function
   package  version cran_folder                time size
 x13binary 1.1.39.3     pretest 2021-03-24 14:23:00 8131
edd@rob:~$ 

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