rcmdcheck
rcmdcheck copied to clipboard
rcmdcheck includes an uninformative traceback when a vignette fails
── R CMD build ─────────────────────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/private/tmp/RtmpwhojZh/build-b4f34fa342/testvignette/DESCRIPTION’ ...
─ preparing ‘testvignette’:
✔ checking DESCRIPTION meta-information ...
─ installing the package to build vignettes
E creating vignettes (974ms)
--- re-building ‘fail.Rmd’ using rmarkdown
Quitting from lines 11-12 [setup] (fail.Rmd)
Error: processing vignette 'fail.Rmd' failed with diagnostics:
This is a problem
--- failed re-building ‘fail.Rmd’
SUMMARY: processing the following file failed:
‘fail.Rmd’
Error: Vignette re-building failed.
Execution halted
Error in `(function (command = NULL, args = character(), error_on_status = TRUE, …`:
! System command 'R' failed
---
Exit status: 1
stdout & stderr: <printed>
---
Backtrace:
1. devtools::check()
2. withr::with_envvar(pkgbuild::compiler_flags(FALSE), action = "prefix", …
3. base::force(code)
4. pkgbuild::build(pkg$path, tempdir(), args = build_args, quiet = quiet, …
5. pkgbuild:::withr_with_makevars(compiler_flags(debug = FALSE), { …
6. pkgbuild:::withr_with_envvar(c(R_MAKEVARS_USER = makevars_file), { …
7. base::force(code)
8. base::force(code)
9. pkgbuild:::withr_with_temp_libpaths(rcmd_build_tools(options$cmd, c(options$path, …
10. base::force(code)
11. pkgbuild::rcmd_build_tools(options$cmd, c(options$path, options$args), …
12. pkgbuild::with_build_tools({ …
13. base::withCallingHandlers(callr::rcmd_safe(..., env = env, spinner = FALSE, …
14. callr::rcmd_safe(..., env = env, spinner = FALSE, show = FALSE, …
15. callr:::run_r(options)
16. base::with(options, with_envvar(env, do.call(processx::run, c(list(bin, …
17. base::with.default(options, with_envvar(env, do.call(processx::run, …
18. base::eval(substitute(expr), data, enclos = parent.frame())
19. base::eval(substitute(expr), data, enclos = parent.frame())
20. callr:::with_envvar(env, do.call(processx::run, c(list(bin, args = real_cmdargs, …
21. base::force(code)
22. base::do.call(processx::run, c(list(bin, args = real_cmdargs, stdout_line_callback = real_callback(stdou…
23. (function (command = NULL, args = character(), error_on_status = TRUE, …
24. base::throw(new_process_error(res, call = sys.call(), echo = echo, …
25. | base::signalCondition(cond)
26. (function (e) …
27. asNamespace("callr")$err$throw(e)
Execution halted
I find this distraction; every time I start scanning the traceback and then eventually remember it's not actually coming from the vignette.
This seems to be a problem when running locally, not on GHA. Example package at https://github.com/hadley/testvignette.