statnet/network

Implementing an effective build check for CRAN

martinamorris opened this issue · 11 comments

From Carter:

BTW, per the email Martina forwarded, it would be ideal if we had a way to duplicate the checks CRAN has started running using rchk - these are trying to ferret out PROTECT issues (and related things), but they seem to use a lot of heuristics that are both overzealous and that do not interact well with the backend code.  Last I checked, there was no way for developers to duplicate CRAN's rchk checks; I tried building my own local version (which was a PITA), but even after doing that I was unable to replicate what CRAN was doing.  It is possible that they've recently added functionality to assist with this, but if so that has been recent.

Try the new rhub package.

rhub::check_for_cran()

@chad-klumb, has there been any progress on this?

No.

I was told we would not be pushing a new version of network to CRAN until pre-Sunbelt next year.

Has that now changed?

My understanding of the op was that it related to rchk which is something we need to worry about for CRAN but typically not otherwise unless we're modifying the C backend of network (which I don't anticipate doing).

The question of where/how to run R CMD check is important (if we're losing the server) but not the same issue.

There is this, which I currently know nothing about:

https://github.com/kalibera/rchk

@CarterButts Do you have any familiarity with this software/repo? I sounds like the sort of thing we're looking to do. Quoting front page:

This project consists of several bug-finding tools that look for memory protection errors in C source code using R API, that is in the source code of R itself and packages. The tools perform whole-program static analysis on LLVM bitcode and run on Linux. About 200-300 memory protection bugs have been found using rchk and fixed in R. rchk is now regularly used to check CRAN packages.

rhub did not want to work on my laptop but apparently worked on my desktop

it appears to do what it claims and offers a variety of platforms to test on

as far as I can tell it will not run reverse dependencies

Pavel noted in #18

R CMD check --use-valgrind on the package fails for network because tests/speedTests.R uses specific numbers for time limits on its tasks. This means that running inside a virtual machine like Valgrind, which slows down the execution, can trigger false positives.

Update: see #19

Closing this, with a followup issue in #19