r-lib / devtools

Tools to make an R developer's life easier
https://devtools.r-lib.org
Other
2.39k stars 760 forks source link

devtools::check() doesn't use BinaryFiles #2438

Closed ricoderks closed 2 years ago

ricoderks commented 2 years ago

Hi,

I added some NMR data to my package (in inst/extdata) and some of the the data files are recognized as an executable file.

checking for executable files ... WARNING
Found the following executable files:
     inst/extdata/Sample123/10/fid
     inst/extdata/Sample22/10/fid
     inst/extdata/Sample244/10/fid
     inst/extdata/Sample281/10/fid
     inst/extdata/Sample294/10/fid
     inst/extdata/Sample396/10/fid
     inst/extdata/Sample40/10/fid
     inst/extdata/Sample452/10/fid
     inst/extdata/Sample460/10/fid
     inst/extdata/Sample9999/10/fid
   Source packages should not contain undeclared executable files.
   See section ‘Package structure’ in the ‘Writing R Extensions’ manual.

I understood that you can silence this warning by making a file called BinaryFiles in the toplevel of the package. Each line should contain a path to the executable file.

My BinaryFiles looks like:

inst/extdata/Sample123/10/fid
inst/extdata/Sample22/10/fid
inst/extdata/Sample244/10/fid
inst/extdata/Sample281/10/fid
inst/extdata/Sample294/10/fid
inst/extdata/Sample396/10/fid
inst/extdata/Sample40/10/fid
inst/extdata/Sample452/10/fid
inst/extdata/Sample460/10/fid
inst/extdata/Sample9999/10/fid

I created this, but if I run devtools::check() it still gives me warnings that there are executable files present. If I run R CMD check all is fine.

I'am using:

I create a small test package with only 1 dat file in it. You can find it here.

Cheers, Rico

hadley commented 2 years ago

Given that I also see:

N  checking top-level files
   Non-standard file/directory found at top level:
     ‘BinaryFiles’

I suspect this is some R CMD check issue and out of our control.