RobinHankin / permutations

https://robinhankin.github.io/permutations/
5 stars 3 forks source link

pkgdown error #52

Closed RobinHankin closed 4 weeks ago

RobinHankin commented 1 month ago

Currently trying to implement pkgdown. Following commit 99eea7b (the result of executing use_pkgdown() and use_pkgdown_github_pages() I see the following error on github actions:

Attaching package: ‘permutations’

The following object is masked from ‘package:stats’:

    cycle

Reading man/Ops.permutation.Rd
Error in `build_reference()`:
! Failed to parse Rd in Ops.permutation.Rd
Caused by error in `UseMethod()`:
! no applicable method for 'replay_html' applied to an object of class "c('permutation', 'word')"
Backtrace:
     ▆
  1. ├─pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
  2. │ └─pkgdown::build_site(...)
  3. │   └─pkgdown:::build_site_local(...)
  4. │     └─pkgdown::build_reference(...)
  5. │       ├─pkgdown:::unwrap_purrr_error(...)
  6. │       │ └─base::withCallingHandlers(...)
  7. │       └─purrr::map(...)
  8. │         └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
  9. │           ├─purrr:::with_indexed_errors(...)
 10. │           │ └─base::withCallingHandlers(...)
 11. │           ├─purrr:::call_with_cleanup(...)
 12. │           └─pkgdown (local) .f(.x[[i]], ...)
 13. │             ├─base::withCallingHandlers(...)
 14. │             └─pkgdown:::data_reference_topic(...)
 15. │               └─pkgdown:::run_examples(...)
 16. │                 └─pkgdown:::highlight_examples(code, topic, env = env)
 17. │                   └─downlit::evaluate_and_highlight(...)
 18. │                     ├─downlit:::replay_html(...)
 19. │                     └─downlit:::replay_html.list(...)
 20. │                       └─base::lapply(x, replay_html, ...)
 21. │                         └─downlit (local) FUN(X[[i]], ...)
 22. └─base::.handleSimpleError(...)
 23.   └─pkgdown (local) h(simpleError(msg, call))
 24.     └─cli::cli_abort(...)
 25.       └─rlang::abort(...)
Execution halted
Error: Process completed with exit code 1.

It's difficult to diagnose remotely, but I think the problem is caused by the print methods (print.word() and print.cycle()) returning their objects.

RobinHankin commented 1 month ago

I can induce the same error by executing pkgdown::build_reference(). Actually I can delete every Rd file except, say, derangement.Rd and get the same error. I'm pretty sure the problem is in the examples.

RobinHankin commented 1 month ago

one result of this is that the package does not pass R CMD check cleanly on account of the pkgdown site not existing.