* Avoid way too many promise domains being activated
Using `captureStackTraces` in wrapForContext is a bad idea, it
piles on a new domain every time a handler is bound.
* Use captureStackTraces, it means the same thing
* Update promises version requirement
* Add test for stack trace growth
* Simplify stack trace snapshot tests
The `category` column isn't a good candidate for snapshot
testing, as its contents vary depending on how the package
was loaded/installed. During devtools::test() or similar,
shiny package code shows up as 'user'. But during CI, it
doesn't show up as anything.
- Moved (in|de)crementBusyCount calls out of Context and into Observer
- decrementBusyCount is (effectively) deferred for async observers until
the async operation is complete
- invalidateLater didn't force(session), almost certainly was buggy
- invalidateLater, reactiveTimer, and manageInputs all now use a new
session$cycleStartAction, which delays their effect until observers
(including async ones) are done executing
* Rename invalidateReactiveValue to freezeReactiveValue
* Make onFlush and onFlushed use 'once' argument
* session$flushOutput: schedule another flush if needed
* Catch all errors before they propagate to websocket
* Restore original logic for progressKeys
This warning was happening to dependent packages on R CMD check.
The problem is due to delayedAssign; it appears this can't be used safely, at least not to define package-level symbols that contain S4 or reference class objects.
If you call this in a package's .R file:
`delayedAssign("hello", stop("boom"))`
but don't refer to "hello" anywhere, when you run R CMD check on a dependent package you'll see the error.
If the expression needs the methods package (like Context$new()), you'll get an error unless the dependent package itself depends on methods.
- makeReactiveBinding: Turns a "regular" variable into a reactive.
No need to use reactiveValues() for simple reactivity.
- setAutoflush (not exported): Causes flushReact() to be called
each time something is executed at the R console top-level.
- options(shiny.suppressMissingContextError=TRUE): Prevents the
"Operation not allowed without an active reactive context" error
when attempting to read a reactive value or expression from the
console.
Observers can now take priority levels, which allow the user to control
the order of execution. Note that reactive expressions do not have
priority levels; since they are lazily evaluated, it wouldn't make any
sense to speak of priorities.
Another commit will be needed to add an API for changing the priorities
of outputs (probably in outputOptions?).