Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rcmdcheck includes an uninformative traceback when a vignette fails #229

Open
hadley opened this issue Jan 22, 2025 · 0 comments
Open

rcmdcheck includes an uninformative traceback when a vignette fails #229

hadley opened this issue Jan 22, 2025 · 0 comments

Comments

@hadley
Copy link
Member

hadley commented Jan 22, 2025

── 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant