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

[Bug]: checks fail on CRAN on macOS r-release #301

Open
3 tasks done
llrs-roche opened this issue Jan 28, 2025 · 1 comment
Open
3 tasks done

[Bug]: checks fail on CRAN on macOS r-release #301

llrs-roche opened this issue Jan 28, 2025 · 1 comment
Labels
bug Something isn't working core

Comments

@llrs-roche
Copy link
Contributor

llrs-roche commented Jan 28, 2025

What happened?

On CRAN teal.reporter version 0.4.0 on R-release MacOs-x86_64 has two errors 2025-01-28 14:53:24 CET

Examples:

Error: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).
Execution halted

rmarkdown requires pandoc 1.14 so this seems like a problem on their machines. But probably code should "fail gracefully".

Tests:

6 tests fail, some with the same error message as for the examples, one seems to be unrelated:

testthat log

  Running ‘testthat.R’ [39s/51s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > pkg_name <- "teal.reporter"
  > library(pkg_name, character.only = TRUE)
  
  > testthat::test_check(pkg_name)
  
  Attaching package: 'testthat'
  
  The following object is masked from 'package:teal.reporter':
  
      Reporter
  
  <simpleError: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).>
  <simpleError: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).>
  <simpleError: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).>
  <simpleError: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).>
  <simpleError: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).>
  Error in (function (card)  : ARTIFICIAL ERROR
  Error in (function (card, comment)  : ARTIFICIAL ERROR
  Error in (function ()  : ARTIFICIAL ERROR
  [ FAIL 6 | WARN 0 | SKIP 0 | PASS 328 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-DownloadReportModule.R:34:7'): download_report_button_srv - render and downlaod a document ──
  any(grepl("[.]html", files)) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  Backtrace:
       ▆
    1. ├─shiny::testServer(...) at test-DownloadReportModule.R:15:3
    2. │ ├─shiny:::withMockContext(...)
    3. │ │ ├─shiny::isolate(...)
    4. │ │ │ ├─shiny::..stacktraceoff..(...)
    5. │ │ │ └─ctx$run(...)
    6. │ │ │   ├─promises::with_promise_domain(...)
    7. │ │ │   │ └─domain$wrapSync(expr)
    8. │ │ │   ├─shiny::withReactiveDomain(...)
    9. │ │ │   │ └─promises::with_promise_domain(...)
   10. │ │ │   │   └─domain$wrapSync(expr)
   11. │ │ │   │     └─base::force(expr)
   12. │ │ │   ├─shiny::captureStackTraces(...)
   13. │ │ │   │ └─promises::with_promise_domain(...)
   14. │ │ │   │   └─domain$wrapSync(expr)
   15. │ │ │   │     └─base::withCallingHandlers(expr, error = doCaptureStack)
   16. │ │ │   └─env$runWith(self, func)
   17. │ │ │     └─shiny (local) contextFunc()
   18. │ │ │       └─shiny::..stacktraceon..(expr)
   19. │ │ ├─shiny::withReactiveDomain(...)
   20. │ │ │ └─promises::with_promise_domain(...)
   21. │ │ │   └─domain$wrapSync(expr)
   22. │ │ │     └─base::force(expr)
   23. │ │ └─withr::with_options(...)
   24. │ │   └─base::force(code)
   25. │ └─rlang::eval_tidy(quosure, mask, rlang::caller_env())
   26. └─testthat::expect_true(any(grepl("[.]html", files))) at test-DownloadReportModule.R:34:7
  ── Failure ('test-DownloadReportModule.R:117:3'): report_render_and_compress - valid arguments ──
  Expected `report_render_and_compress(reporter, input, knitr_args, temp_dir)` to run without any errors.
  ℹ Actually got a <simpleError> with text:
    attempt to apply non-function
  ── Error ('test-DownloadReportModule.R:130:3'): report_render_and_compress - render an html document ──
  Error in `session$sendNotification("show", list(html = res$html, action = actionRes$html, 
      deps = c(res$deps, actionRes$deps), duration = if (!is.null(duration)) duration * 
          1000, closeButton = closeButton, id = id, type = match.arg(type)))`: attempt to apply non-function
  Backtrace:
      ▆
   1. └─teal.reporter:::report_render_and_compress(...) at test-DownloadReportModule.R:130:3
   2.   └─base::tryCatch(...)
   3.     └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   4.       └─base (local) tryCatchOne(...)
   5.         └─value[[3L]](cond)
   6.           └─shiny::showNotification(...)
  ── Failure ('test-PreviewerReportModule.R:32:7'): reporter_previewer_srv - render and downlaod a document ──
  any(grepl("[.]html", files)) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  Backtrace:
       ▆
    1. ├─shiny::testServer(...) at test-PreviewerReportModule.R:14:3
    2. │ ├─shiny:::withMockContext(...)
    3. │ │ ├─shiny::isolate(...)
    4. │ │ │ ├─shiny::..stacktraceoff..(...)
    5. │ │ │ └─ctx$run(...)
    6. │ │ │   ├─promises::with_promise_domain(...)
    7. │ │ │   │ └─domain$wrapSync(expr)
    8. │ │ │   ├─shiny::withReactiveDomain(...)
    9. │ │ │   │ └─promises::with_promise_domain(...)
   10. │ │ │   │   └─domain$wrapSync(expr)
   11. │ │ │   │     └─base::force(expr)
   12. │ │ │   ├─shiny::captureStackTraces(...)
   13. │ │ │   │ └─promises::with_promise_domain(...)
   14. │ │ │   │   └─domain$wrapSync(expr)
   15. │ │ │   │     └─base::withCallingHandlers(expr, error = doCaptureStack)
   16. │ │ │   └─env$runWith(self, func)
   17. │ │ │     └─shiny (local) contextFunc()
   18. │ │ │       └─shiny::..stacktraceon..(expr)
   19. │ │ ├─shiny::withReactiveDomain(...)
   20. │ │ │ └─promises::with_promise_domain(...)
   21. │ │ │   └─domain$wrapSync(expr)
   22. │ │ │     └─base::force(expr)
   23. │ │ └─withr::with_options(...)
   24. │ │   └─base::force(code)
   25. │ └─rlang::eval_tidy(quosure, mask, rlang::caller_env())
   26. └─testthat::expect_true(any(grepl("[.]html", files))) at test-PreviewerReportModule.R:32:7
  ── Error ('test-Renderer.R:34:3'): render returns the same path as get_last_output_file ──
  Error: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).
  Backtrace:
       ▆
    1. ├─testthat::expect_true(...) at test-Renderer.R:34:3
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─basename(renderer$render(blocks)) %in% ...
    5. ├─base::basename(renderer$render(blocks))
    6. └─renderer$render(blocks)
    7.   ├─base::do.call(rmarkdown::render, args)
    8.   └─rmarkdown (local) `<fn>`(...)
    9.     └─rmarkdown::pandoc_available(required_pandoc, error = TRUE)
   10.       └─rmarkdown:::stop2(paste(msg, collapse = " "))
  ── Failure ('test-SimpleReporter.R:37:7'): simple_reporter_srv - render and downlaod  a document ──
  any(grepl("[.]html", files)) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  Backtrace:
       ▆
    1. ├─shiny::testServer(...) at test-SimpleReporter.R:18:3
    2. │ ├─shiny:::withMockContext(...)
    3. │ │ ├─shiny::isolate(...)
    4. │ │ │ ├─shiny::..stacktraceoff..(...)
    5. │ │ │ └─ctx$run(...)
    6. │ │ │   ├─promises::with_promise_domain(...)
    7. │ │ │   │ └─domain$wrapSync(expr)
    8. │ │ │   ├─shiny::withReactiveDomain(...)
    9. │ │ │   │ └─promises::with_promise_domain(...)
   10. │ │ │   │   └─domain$wrapSync(expr)
   11. │ │ │   │     └─base::force(expr)
   12. │ │ │   ├─shiny::captureStackTraces(...)
   13. │ │ │   │ └─promises::with_promise_domain(...)
   14. │ │ │   │   └─domain$wrapSync(expr)
   15. │ │ │   │     └─base::withCallingHandlers(expr, error = doCaptureStack)
   16. │ │ │   └─env$runWith(self, func)
   17. │ │ │     └─shiny (local) contextFunc()
   18. │ │ │       └─shiny::..stacktraceon..(expr)
   19. │ │ ├─shiny::withReactiveDomain(...)
   20. │ │ │ └─promises::with_promise_domain(...)
   21. │ │ │   └─domain$wrapSync(expr)
   22. │ │ │     └─base::force(expr)
   23. │ │ └─withr::with_options(...)
   24. │ │   └─base::force(code)
   25. │ └─rlang::eval_tidy(quosure, mask, rlang::caller_env())
   26. └─testthat::expect_true(any(grepl("[.]html", files))) at test-SimpleReporter.R:37:7
  
  [ FAIL 6 | WARN 0 | SKIP 0 | PASS 328 ]
  Error: Test failures
  Execution halted

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
@llrs-roche llrs-roche added bug Something isn't working core labels Jan 28, 2025
@llrs-roche
Copy link
Contributor Author

After emailing the r-pkg-devel mailing list it turns out that Simon Urbanek will add back pandoc and the package will be checked again:

thanks, yes, after the last update of recipes pandoc was gone since it is not part of recipes, now restored so failed packages should get re-checked in the next run.

Leaving the issue open in case it doesn't resolve itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core
Projects
None yet
Development

No branches or pull requests

1 participant