[R-pkg-devel] Rd cross-references ... NOTE, Undeclared packages ... in Rd xrefs

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Tue Jun 14 01:24:40 CEST 2022


On 13/06/2022 7:01 p.m., Spencer Graves wrote:
[ lots deleted ]
> 
> 	  Is there a way in GitHub Action to NOT fail when a package is not
> available -- or at least to give a more useful diagnostic?
> 

I don't know the answer to that, but in this case, I'm pretty sure 
Github Actions couldn't be more helpful, because the error message was 
coming from R in these lines in your Github script:

           install.packages('remotes')
           saveRDS(remotes::dev_package_deps(dependencies = TRUE), 
".github/depends.Rds", version = 2)
           writeLines(sprintf("R-%i.%i", getRversion()$major, 
getRversion()$minor), ".github/R-version")

I have the same lines in my script, so I suspect you copied these from 
another package, as I did.

To diagnose that kind of error, just start a clean R session, set the 
working directory to your package directory, and try to execute them. 
You'll see the same error message as your Github action got.  Then you 
can debug that the way you debug any other R error message:

- Break it up into separate pieces, and discover it happens in 
remotes::dev_package_deps(dependencies = TRUE)

- Run debug(remotes::dev_package_deps), and run just that one command, 
tracing through until you can isolate the issue.

> 
> 	  There probably is, but I don't know how to find the right manual to
> read nor any better place to ask for help with that than here.

Duncan Murdoch



More information about the R-package-devel mailing list