24

This is the error I get after running devtools::check_rhub()

checking for non-standard things in the check directory ... NOTE Found the following files/directories: 'disk.frame-Ex_i386.Rout' 'disk.frame-Ex_x64.Rout' 'examples_i386' 'examples_x64'

These notes don't appear when I run devtools::check().

I don't understand what these mean. The package I am running is disk.frame.

xiaodai
  • 14,889
  • 18
  • 76
  • 140
  • I think those should have been escaped here: https://github.com/wch/r-source/blob/bdbb13ecbcb57cb4ca464ede277fc227bf608cf0/src/library/tools/R/check.R#L6512 not sure why they aren't – jangorecki Apr 29 '20 at 18:43
  • Those files are auto-generated when you run `R CMD check ` and contain the results of function examples in text. But like the previous comment said, they should be ignored. – anymous.asker Mar 29 '21 at 19:22

1 Answers1

1

Not sure if it's the same cause, but R CMD check --as-cran was picking up a .DS_store file that definitely wasn't there! (so I'm pretty sure there's a bug)

First I made absolutely sure the file wasn't there with ls -a (the a flag shows hidden files).

When I was sure it wasn't there, but check insisted that it was, the humble solution was to close and reopen RStudio, and then the problem mysteriously went away.

This solution might not work for everyone, but it solved for me.

stevec
  • 41,291
  • 27
  • 223
  • 311
  • This is unrelated to OP’s issue. Theirs is related to specific files which are generated *by R*, and which *should* be there, and which should be ignored by `R CMD check`. – Konrad Rudolph Jan 10 '22 at 11:49
  • @KonradRudolph are you sure? I know the files are different (`.DS_Store` as opposed to `disk.frame-Ex_i386.Rout`), but the problem otherwise looks similar? – stevec Jan 10 '22 at 11:50
  • Yes, the fact that the files different is crucial. [`.DS_Store`](https://en.wikipedia.org/wiki/.DS_Store) is a file that’s auto-generated by macOS under some circumstances, it has nothing to do with the files that OP is observing. – Konrad Rudolph Jan 10 '22 at 11:52
  • @KonradRudolph I'm gonna go out on a limb here, but I think OP's problem isn't files that check expects to be there but aren't, but rather files that check thinks are there (and believes shouldn't be) but really they aren't there at all. That's how I interpreted the question, and it's what jogged my memory that I had recently had a seemly similar (and bizarre) problem. – stevec Jan 10 '22 at 11:53
  • No, you’re misdiagnosing the issue. Both in OP’s case and in yours the files *are really* there. Otherwise `R CMD check` wouldn’t complain. But the underlying cause and remedy in both cases are fundamentally different: in OP’s case the files *should* be there and the `R CMD check` warning is a bug in R. In your case the file is auto-generated by the OS and restarting R presumably deleted and re-generated the `check` directory, this time without the auto-generated file. – Konrad Rudolph Jan 10 '22 at 11:57
  • As for why you didn’t see the file when checking with `ls -a`, it’s highly likely that you either accidentally checked the wrong folder, or that you checked after the directory was regenerated, or you checked after macOS deleted the file automatically for some reason. Either way, the file *was* there at the point where `R CMD check` listed the folder contents, and that’s why it complained. – Konrad Rudolph Jan 10 '22 at 11:57
  • @KonradRudolph I don't discount those possibilities (or probabilities :) ) but I have had the standard .DS_Store problem a million times, but this was something completely different, as I could be absolutely sure that it wasn't there (except for some really crazy behaviour that you mention could have happened). AFAIK there was no .DS_Store in the directory, .gitignore and .Rbuildignore both forbade it, and fastidious `ls -a` wouldn't reveal it. It was going on for some hours until I gave in and googled and came across the linked SO post, where simply restarting RStudio solved. – stevec Jan 10 '22 at 12:02
  • @KonradRudolph just so we're on the same page, I don't think I'm right about the cause for OP's problem, I just think it's a possibility, and that people could end up here for any of a few reasons, hence it may save time for a small number of people who experience whatever weirdness was going on for me. – stevec Jan 10 '22 at 12:03
  • Just to be clear: `.gitignore` and `.RBuildignore` don’t prevent a `.DS_Store` file from being generated. They merely prevent it from being checked in, or from being copied during package build. What must be happening your case (and in the linked report) is that RStudio somehow (accidentally) triggers the macOS Finder API to generate the `.DS_Store` file for the check directory. Unfortunately this can happen for any number of reasons, and Apple isn’t good at documenting this. – Konrad Rudolph Jan 10 '22 at 12:15