Skip to content

Fix check-depends-only failure by correcting tryCatch error handler signature in shiny version guard#101

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-reactlog-package-checks
Draft

Fix check-depends-only failure by correcting tryCatch error handler signature in shiny version guard#101
Copilot wants to merge 2 commits intomainfrom
copilot/fix-reactlog-package-checks

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 17, 2026

Scheduled package checks from shinycoreci started failing on main in R-CMD-check / check-depends-only. The failure came from test_shiny_version() raising unused argument (cond) when shiny is absent and tryCatch invokes the error handler with a condition argument.

  • Root cause

    • test_shiny_version() used an error handler with zero parameters (function()), which is incompatible with condition-passing handler invocation.
  • Code change

    • Updated the error handler in R/shinyModule.R to accept the condition argument and continue returning FALSE when shiny is unavailable.
    • This preserves existing behavior (graceful skip/fallback when shiny is not installed) while removing the runtime error in depends-only checks.
  • Patch snippet

    test_shiny_version <- function() {
      tryCatch({
        utils::packageVersion("shiny") >= shiny_version_required()
      }, error = function(e) {
        # package not found
        FALSE
      })
    }

Copilot AI changed the title [WIP] Fix failing checks for reactlog package on main Fix check-depends-only failure by correcting tryCatch error handler signature in shiny version guard Apr 17, 2026
Copilot AI requested a review from karangattu April 17, 2026 00:14
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

Successfully merging this pull request may close these issues.

Automated fix: reactlog package checks failing on main

2 participants