Skip to content

check() and build() hang if DESCRIPTION file is malformed #90

Closed

Description

@ms609

I'm running devtools 2.0.1 on R3.5.1, Windows 10.

When I run check() or build(), R hangs at

    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.

Activity

  1. jimhester commented on Nov 2, 2018

    @jimhester
    Member

    Please try installing the development version of rcmdcheck and see if that fixes your issue.

    https://github.com/r-lib/rcmdcheck

  2. ms609 commented on Nov 2, 2018

    @ms609
    Author

    This seems to have resolved the issue, thank you.

  3. reopened this on Nov 2, 2018
  4. ms609 commented on Nov 2, 2018

    @ms609
    Author

    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' ... 
    

    and then gets stuck again.

  5. reopened this on Nov 2, 2018
  6. ms609 commented on Nov 2, 2018

    @ms609
    Author

    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.

  7. ghost deleted a comment from jimhester on Nov 2, 2018
  8. ghost closed this as completedon Nov 2, 2018
  9. transferred this issue fromr-lib/devtoolson Nov 2, 2018
  10. deleted a comment from on Nov 2, 2018
  11. gaborcsardi commented on Nov 5, 2018

    @gaborcsardi
    Member

    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 ✔
    
  12. jimhester commented on Nov 5, 2018

    @jimhester
    Member

    This is how R CMD build works, nothing really to do with pkgbuild, 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

  13. gaborcsardi commented on Nov 5, 2018

    @gaborcsardi
    Member

    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.

  14. gaborcsardi commented on Nov 5, 2018

    @gaborcsardi
    Member

    I'll close this now and will open another issue for the possibly no-copy improvement in pkgbuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions