[R-pkg-devel] How to debug build-time dynamic documentation issues?

Georgi Boshnakov georg|@bo@hn@kov @end|ng |rom m@nche@ter@@c@uk
Fri Aug 13 09:00:52 CEST 2021


(Sorry for the previous messages, accidentally sent it prematurely while typing on the phone.)

It may be worth checking if the users can install the package if you send them (1) tarball or (2) a binary build (if you don't have Windows, win-builder creates one). A user had a similar issue with a package of mine and (1) didn't work but (2) did. On my Windows laptop I had  similar issue and resolved it by updating the packages in the current  installation. 
The reason for the problem seemed to be inconsistent versions of some installed packages, almost certainly Matrix and matrixStats in my case.

Georgi Boshnakov


-----Original Message-----
From: R-package-devel <r-package-devel-bounces using r-project.org> On Behalf Of Georgi Boshnakov
Sent: 13 August 2021 07:47
To: Pavel N. Krivitsky <p.krivitsky using unsw.edu.au>; R Package Devel <r-package-devel using r-project.org>
Subject: Re: [R-pkg-devel] How to debug build-time dynamic documentation issues?

It may be worth checking if the users can install the package if you send them (1) tarball or (2) a binary build (if you don't have Windows, win-builder creates one).

A user had a similar issue with a package

Get Outlook for Android<https://aka.ms/AAb9ysg> ________________________________
From: R-package-devel <r-package-devel-bounces using r-project.org> on behalf of Pavel N. Krivitsky <p.krivitsky using unsw.edu.au>
Sent: Friday, August 13, 2021 4:06:33 AM
To: R Package Devel <r-package-devel using r-project.org>
Subject: [R-pkg-devel] How to debug build-time dynamic documentation issues?

Dear All,

TL;DR: Is there a way to get a full traceback and/or frame dump for errors that occur in build-time and install-time \Sexpr{} calls in R documentation files?


# Context

I am working on a package (
https://github.com/joycecheng/ergm/tree/ergm-term-index ) whose documentation includes a number of \Sexpr[stage=render]{} calls, and I am getting reports that some Windows users are not able to install the package because they get errors when the HTML indices are being built.

Complicating the matter is that this only seems to affect some Windows systems but not others.

Unfortunately, R's output is not very helpful in identifying the problem beyond the help file in which it had occurred and the terminal error message. For example, on those systems with R 4.1.0:

remotes::install_github("joycecheng/ergm using ergm-term-index")

gives (for those users):

[SNIP]
ergmConstraint html
Error: incorrect number of dimensions
- removing
'C:/Users/[SNIP]/AppData/Local/Temp/RtmpURZYMP/Rinst1144e5a2698/ergm'
-----------------------------------
ERROR: package installation failed
Error: Failed to install 'ergm' from GitHub:
System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr (last
10 lines):
E> ergm.exact html
E> ergm.geodistdist html
E> ergm.getnetwork html
E> ergm.godfather html
E> ergm.mple html
E> ergmConstraint html
E> Error: incorrect number of dimensions
E> * removing
'C:/Users/[SNIP]/AppData/Local/Temp/RtmpURZYMP/Rinst1144e5a2698/ergm'
E> -----------------------------------
E> ERROR: package installation failed


# What I've tried so far

 * Running the code in the \Sexpr{} manually in an R session doesn't
   reproduce the error: this seems to be a build/install-time issue.
 * options(error=...) does the wrong thing, because the \Sexpr{} code
   is run inside tryCatch(), so what gets traced and/or dumped is
   catching code, not the original error.

Thanks in advance,
Pavel

______________________________________________
R-package-devel using r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel

	[[alternative HTML version deleted]]

______________________________________________
R-package-devel using r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list