[Bioc-devel] How to recreate R CMD BUILD environment in interactive session?

Elizabeth Purdom epurdom at stat.berkeley.edu
Mon Oct 23 15:26:02 CEST 2017


I am updating an existing package and I am getting an error in running my vignette (and a similar error in an example in help pages) but ONLY when I run R CMD BUILD. I can’t recreate the error in any session where I can debug and figure out what is happening. So my question is how can I recreate the exact environment of R CMD BUILD that runs the vignette but in an interactive session so that I can figure out what is going on?

I have tried reproducing the error in other environments:

* Running R —vanilla interactively and trying the code manually
* running purl on my vignette to get pure R code and running just the R code with R CMD BATCH —vanilla
* Running R —vanilla interactively and compiling the vignette

But all of the above runs the code without any error.

Furthermore, for some reason TravisCI can build the package without problem nor does it hit any error in R CMD CHECK with TravisCI so for a long time I assumed it was some local file or environment on my machine and forgot about it. But now that I have pushed the changes to Bioconductor, they are getting the same error about the vignette not building. 

By the way, I can’t slowly take back my commands to see what broke it, because the change was a dramatic one involving redefining my S4 class, so a large number of things had to be adapted before any code would work and there’s no way to slowly roll that back. 

Most of the posts I have seen about debugging discrepancies between R CMD BUILD (or equivalently R CMD CHECK) seem to be about namespace issues with other packages. Of course I can’t be sure since I have a pretty terse error from R CMD BUILD, but the error that is given is my own error (it’s a check I wrote as part of the validity check when I updated the class) so it seems unclear how it would be a namespace error. 

Thanks for any suggestions,
Elizabeth Purdom

More information about the Bioc-devel mailing list