The internal function `.addCondHands` is used in place of
`withConditionHandlers` to avoid adding a call to the stack. This
generates a warning during `R CMD check`.
The `captureStackTraces` function is removed from `hybrid_chain`.
Instead stack traces are captured and annotated by a `captureStackTraces`
invoked by `runApp` higher up the call stack.
Replaces `tryCatch` in `hybrid_chain` with `withCallingHandlers`. This improves
Shiny on webR on Safari < 16.4 by reducing the amount of call stack used during
deep nested calls to `hybrid_chain`.
A `delayedAssign` is used so that if the error condition handler is invoked,
the condition is handled or re-thrown in the context of `hybrid_chain`, rather
than the context of the inner function deeper in the stack.
The `finally` argument is reimplemented with an `on.exit()`.
* feat(shiny.error.unhandled): Allow users to provide an unhandled error handler
* Extract `shinyUserErrorUnhandled()` to use in MockSession too
* tests(shiny.error.unhandled): Test that unhandled errors are handled safely
* docs: Clarify that session still ends with an unhandled error
* docs: Add news item
Adds a req(FALSE, cancelOutput="progress") which behaves similarly to
cancelOutput=TRUE, but also keeps the output in .recalculating state
even across flush cycles. This is called "persistent progress" and an
output can leave this state when it is invalidated again and doesn't
call req(FALSE, cancelOutput="progress") during that flush cycle.
This will be useful for implementing long-running tasks that don't
hold up the flush cycle, leaving sessions responsive to do other
tasks.
Added an empty option to `choices` in `selectizeInput` in order to make the second `need` statement in `validate` meaningful. Otherwise the second `need` ("Please choose a state") is never displayed.
* Allow trailing commas in more places
I grepped for list(...) and replaced with rlang::list2(...). This also enables !!! which is generally not important for Shiny because it automatically splices lists/tagLists, but I doubt it will affect any existing code.
* update news; no need to rlang::
* missed one
* Update NEWS.md
Co-authored-by: Hadley Wickham <h.wickham@gmail.com>
Co-authored-by: Carson Sievert <cpsievert1@gmail.com>