Conversation
… and flow-typed Agent-Logs-Url: https://github.com/rstudio/reactlog/sessions/abc2ff6b-f2f2-4b15-b89c-586e6ebdf029 Co-authored-by: karangattu <4220325+karangattu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix automated checks for reactlog package on main
Fix R CMD check failures: error handler signature, example return(), vignette dependency, flow-typed resilience
Apr 15, 2026
There was a problem hiding this comment.
Pull request overview
Fixes CI failures in strict R CMD check (R_CHECK_DEPENDS_ONLY) and improves robustness of the JS postinstall step.
Changes:
- Fix
tryCatch()error-handler signature and improveassert_shiny_version()message formatting. - Restructure roxygen examples to avoid top-level
return()whenshinyisn’t installed. - Make
flow-typed installnon-blocking inpostinstall, and movermarkdowntoImportsfor vignette builds under depends-only checks.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| bin/postinstall.sh | Makes flow-typed install non-fatal to improve resilience during postinstall/build. |
| R/shinyModule.R | Fixes Shiny version checks and roxygen examples that were failing R CMD check. |
| DESCRIPTION | Ensures rmarkdown is available during depends-only vignette build/checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
check-depends-onlyCI job (which runs R CMD check with_R_CHECK_DEPENDS_ONLY_=TRUE) and theroutineJS build job were both failing due to pre-existing bugs.R code fixes (
R/shinyModule.R)test_shiny_version()error handler missing parameter —tryCatcherror handlers must accept the condition object;error = function()causedunused argument (cond)whenever shiny wasn't installed:return()in example —return()outside a function body throwsno function to return from. Restructured to positive guard:assert_shiny_version()missing()—shiny_version_requiredwas referenced as an object, not called; would print the function definition in error messages instead of the version string.Vignette dependency (
DESCRIPTION)Moved
rmarkdownfromSuggests→Imports. With_R_CHECK_DEPENDS_ONLY_=TRUE, only Depends/Imports packages are available. The vignette uses%\VignetteEngine{knitr::rmarkdown}, which requires rmarkdown at build time — causing an ERROR in the strict check.JS build resilience (
bin/postinstall.sh)Added
|| truetoyarn flow-typed install.flow-typedv2.5.1 uses a deprecated@octokit/restAPI that throws uncaught errors when the GitHub API is unreachable, failing the entireroutinejob.