You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
check() and build() hang if DESCRIPTION file is malformed #90
v checking for file 'C:\path\to\package/DESCRIPTION' ...
The terminal looks "busy", but never progresses. This occurs whether I run the function from the console, or from within RStudio.
When I run R CMD check in the Windows Command Prompt, I receive an error message and CMD check completes:
C:\Research\R>R CMD check Quartet
* using log directory 'C:/Research/R/Quartet.Rcheck'
* using R version 3.5.1 (2018-07-02)
* using platform: i386-w64-mingw32 (32-bit)
* using session charset: ISO8859-1
* checking for file 'Quartet/DESCRIPTION' ... ERROR
Required fields missing or empty:
'Author' 'Maintainer'
* DONE
Status: 1 ERROR
The problem with the description file turns out to be that I'd Suggests:ed a package, rtqdist, that is not available on CRAN, without specifying a path to the package under the Remotes: field.
I would expect devtools to report this as an error (as happened using R CMD check once I'd added a dummy Author: and Maintainer: field to the DESCRIPTION file, rather than hanging.
It initially looked as though this had resolved the issue, but I believe I was mistaken -- I've been making other changes to the package and, when this caused check to compile the package, and assumed that the issue had been fixed. But now that the C code is compiling again, check gets as far as
v checking for file 'C:\path\to\package/DESCRIPTION' ...
Digging into this further, it seems that the issue relates to file copying or access issues. My package contained a data-raw folder, listed in .Rbuildignore, but containing many thousand files. Now that I've deleted the folder, check() still sticks for a long time after checking for file ... DESCRIPTION, but does eventually proceed to
- preparing 'Quartet': (1m 35.8s)
Presumably this "preparing" stage was previously taking upwards of 30 minutes, leading me to interpret the process as hanging.
Would it be desirable / possible to display the - preparing 'PACKAGENAME': message sooner, rather than waiting until it was complete? This would give users an indication as to why the process appears to have stalled.
I am pretty sure that this has nothing to do with the missing fields in DESCRIPTION, see my output below.
It seems that pkgbuild maybe copies the whole data-raw directory, even if it is in .Rbuildignore. Let me take a closer look.
❯ rcmdcheck("bad3")
── R CMD build ─────────────────────────────────────────────────────────────────
✔ checking for file ‘.../DESCRIPTION’ ...
─ preparing ‘badpackage’:
✔ checking DESCRIPTION meta-information
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘badpackage_1.0.0.tar.gz’
── R CMD check ─────────────────────────────────────────────────────────────────
─ using log directory ‘/private/var/folders/59/0gkmw1yj2w7bf2dfc3jznv5w0000gn/T/RtmpXiV3Yg/file170bfb03ba5e/badpackage.Rcheck’
─ using R version 3.5.1 (2018-07-02)
─ using platform: x86_64-apple-darwin15.6.0 (64-bit)
─ using session charset: UTF-8
E checking for file ‘badpackage/DESCRIPTION’
Required fields missing or empty:
‘Author’ ‘Maintainer’
See
‘/private/var/folders/59/0gkmw1yj2w7bf2dfc3jznv5w0000gn/T/RtmpXiV3Yg/file170bfb03ba5e/badpackage.Rcheck/00check.log’
for details.
── R CMD check results ─────────────────────────────────── badpackage 1.0.0 ────
Duration: 412ms
❯ checking for file ‘badpackage/DESCRIPTION’ ... ERROR
Required fields missing or empty:
‘Author’ ‘Maintainer’
1 error ✖ | 0 warnings ✔ | 0 notes ✔
Oh, OK, good to know. :) So this is not a bug in pkgbuild of rcmdcheck then.
I wonder if we can improve the current behavior, though. I guess the problem is that the extra files and directories are sometimes used during R CMD build.
Activity
jimhester commentedon Nov 2, 2018
Please try installing the development version of rcmdcheck and see if that fixes your issue.
https://github.com/r-lib/rcmdcheck
ms609 commentedon Nov 2, 2018
This seems to have resolved the issue, thank you.ms609 commentedon Nov 2, 2018
It initially looked as though this had resolved the issue, but I believe I was mistaken -- I've been making other changes to the package and, when this caused
checkto compile the package, and assumed that the issue had been fixed. But now that the C code is compiling again,checkgets as far asand then gets stuck again.
ms609 commentedon Nov 2, 2018
Digging into this further, it seems that the issue relates to file copying or access issues. My package contained a
data-rawfolder, listed in.Rbuildignore, but containing many thousand files. Now that I've deleted the folder,check()still sticks for a long time afterchecking for file ... DESCRIPTION, but does eventually proceed toPresumably this "preparing" stage was previously taking upwards of 30 minutes, leading me to interpret the process as hanging.
Would it be desirable / possible to display the
- preparing 'PACKAGENAME':message sooner, rather than waiting until it was complete? This would give users an indication as to why the process appears to have stalled.gaborcsardi commentedon Nov 5, 2018
I am pretty sure that this has nothing to do with the missing fields in
DESCRIPTION, see my output below.It seems that pkgbuild maybe copies the whole data-raw directory, even if it is in
.Rbuildignore. Let me take a closer look.jimhester commentedon Nov 5, 2018
This is how
R CMD buildworks, nothing really to do withpkgbuild, it always copies all directories first, then unlinks the ones in.Rbuildignore.https://github.com/wch/r-source/blob/521c90a175d67475b9f1b43d7ae68bc48062d8e6/src/library/tools/R/build.R#L1012-L1035
gaborcsardi commentedon Nov 5, 2018
Oh, OK, good to know. :) So this is not a bug in pkgbuild of rcmdcheck then.
I wonder if we can improve the current behavior, though. I guess the problem is that the extra files and directories are sometimes used during
R CMD build.gaborcsardi commentedon Nov 5, 2018
I'll close this now and will open another issue for the possibly no-copy improvement in pkgbuild.