-
Notifications
You must be signed in to change notification settings - Fork 335
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
Build_site failure with examples #2746
Comments
Confirmed this fails non-shiny examples as well |
I'm unable to reproduce this error, your package and site builds fine on my machine. Can you try running |
After clean_site it's now working fine on both packages. Thanks for the quick response! I'll be sure to clean site if I see any weird errors in the future. I didn't run |
oops, |
I started having weird issues again with 2.1.0, traced it to something deep in |
Hey! First of all, thanks for the awesome on-ongoing work with the package, that keep bringing documentation easily to every useRs! ❤️ I've also experienced the same issue as @TheZetner as in the first message. Bumping to dev version (ee72108) and using Regarding YAML files, I did needed to bump Best, |
Start by installing the latest version of httr2. |
@jayhesselberth @hadley I'm having the same error, with pkgdown 2.1.1, httr2 1.0.5. I run pkgdown::clean_site(), pkgdown::clean_cache(), devtools::document() before building the reference, # > pkgdown::build_reference()
Error in `build_reference()`:
! Failed to parse Rd in a_test_function.Rd
Caused by error in `output_handler$source()`:
! argument "expr" is missing, with no default
Backtrace:
▆
1. ├─pkgdown::build_reference()
2. │ ├─pkgdown:::unwrap_purrr_error(...) at pkgdown/R/build-reference.R:188:3
3. │ │ └─base::withCallingHandlers(...) at pkgdown/R/utils.R:39:3
4. │ └─purrr::map(...) at pkgdown/R/build-reference.R:188:3
5. │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress) at purrr/R/map.R:129:3
6. │ ├─purrr:::with_indexed_errors(...) at purrr/R/map.R:174:3
7. │ │ └─base::withCallingHandlers(...) at purrr/R/map.R:201:3
8. │ ├─purrr:::call_with_cleanup(...) at purrr/R/map.R:174:3
9. │ └─pkgdown (local) .f(.x[[i]], ...)
10. │ ├─base::withCallingHandlers(...) at pkgdown/R/build-reference.R:280:3
11. │ └─pkgdown:::data_reference_topic(...) at pkgdown/R/build-reference.R:280:3
12. │ └─pkgdown:::run_examples(...) at pkgdown/R/build-reference.R:367:5
13. │ └─pkgdown:::highlight_examples(code, topic, env = env) at pkgdown/R/rd-example.R:36:5
14. │ └─downlit::evaluate_and_highlight(...) at pkgdown/R/highlight.R:57:3
15. │ └─evaluate::evaluate(code, child_env(env), new_device = TRUE, output_handler = output_handler) at downlit/R/evaluate.R:46:3
16. │ └─evaluate:::evaluate_call(...)
17. │ └─output_handler$source(source)
18. └─base::.handleSimpleError(...) at pkgdown/R/highlight.R:32:5
19. └─pkgdown (local) h(simpleError(msg, call))
20. └─cli::cli_abort(...) at pkgdown/R/build-reference.R:288:7
21. └─rlang::abort(...) at cli/R/rlang.R:45:3 If I don't run the examples, it worked fine #' test func
#' @export
#' @return NULL
#' @examples
#' 1 + 1
a_test_function <- function() {} R version 4.4.1 (2024-06-14)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.5 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: America/Los_Angeles
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices datasets utils methods base
other attached packages:
[1] myPkg_0.0.99 testthat_3.2.1.1
loaded via a namespace (and not attached):
[1] xfun_0.45 bslib_0.7.0 htmlwidgets_1.6.4 devtools_2.4.5 remotes_2.5.0 gargle_1.5.2 tzdb_0.4.0 vctrs_0.6.5
[9] tools_4.4.1 generics_0.1.3 tibble_3.2.1 fansi_1.0.6 pkgconfig_2.0.3 desc_1.4.3 lifecycle_1.0.4 compiler_4.4.1
[17] stringr_1.5.1 textshaping_0.4.0 brio_1.1.5 fontawesome_0.5.2 httpuv_1.6.15 htmltools_0.5.8.1 usethis_2.2.3 sass_0.4.9
[25] yaml_2.3.8 later_1.3.2 pillar_1.9.0 pkgdown_2.1.1 jquerylib_0.1.4 urlchecker_1.0.1 whisker_0.4.1 tidyr_1.3.1
[33] ellipsis_0.3.2 openssl_2.2.0 googlesheets4_1.1.1 cachem_1.1.0 sessioninfo_1.2.2 mime_0.12 tidyselect_1.2.1 digest_0.6.35
[41] stringi_1.8.3 dplyr_1.1.4 purrr_1.0.2 rprojroot_2.0.4 fastmap_1.2.0 cli_3.6.3 magrittr_2.0.3 pkgbuild_1.4.4
[49] utf8_1.2.4 readr_2.1.5 withr_3.0.0 promises_1.3.0 googledrive_2.1.1 rmarkdown_2.27 cellranger_1.1.0 askpass_1.2.0
[57] ragg_1.3.2 chk_0.9.2 hms_1.1.3 memoise_2.0.1 shiny_1.8.1.1 evaluate_0.23 knitr_1.48 miniUI_0.1.1.1
[65] profvis_0.3.8 rlang_1.1.4 downlit_0.4.4 Rcpp_1.0.12 xtable_1.8-4 glue_1.8.0 xml2_1.3.6 renv_1.0.7
[73] pkgload_1.3.4 rstudioapi_0.16.0 jsonlite_1.8.8 R6_2.5.1 systemfonts_1.1.0 fs_1.6.4 |
I managed to fix it by upgrading |
I've found after updating pkgdown from 2.0.9 to 2.1.0 that site building fails on the
build_reference
step when I have examples in my Rd documents. These failures go away when I delete the examples and persist even if the examples are labelled with\dontrun{}
or commented out in the roxygen headers (#' # examplecode
).I've debugged fairly deeply into the nested functions of
build_site()
(build_reference > build_reference_topic > data_reference_topic > run_examples
) but frankly was out of my depth by the lowest point there.The error I've been getting is:
.lastError
returns the following:I've made a branch showing this behaviour in a very small package here: https://github.com/TheZetner/esckey/tree/failingbuild
For now I'm just cutting the examples (as they're super minimal for esckey) but this is an issue for rebuilding my more complex sites where I've simply reverted to pkgdown 2.0.9.
Lastly I love this package! I've used it for several packages now and it just makes documentation and presentation a breeze. Thanks for it!
Cheers,
Adrian
The text was updated successfully, but these errors were encountered: