rstudio / shinymeta

Record and expose Shiny app logic using metaprogramming
https://rstudio.github.io/shinymeta
223 stars 14 forks source link

env and quoted are deprecated #91

Closed jcheng5 closed 3 years ago

jcheng5 commented 3 years ago

Error messages with shiny 1.6.0 devmode():

The env and quoted arguments are deprecated as of shiny 1.6.0. Please use quosures from rlang instead. See https://github.com/rstudio/shiny/issues/3108 for more information.

If we change shinymeta to use quosures, then we can't forget to bump the shiny dependency to >= 1.6.0.

jcheng5 commented 3 years ago

@cpsievert and I tried fixing this today and couldn't get it to work. The example in https://github.com/rstudio/shiny/issues/3108 shows the same error we were getting: Quosures can only be unquoted within a quasiquotation context.

cpsievert commented 3 years ago

Winston is going to update the now outdated example in that issue, but in case he doesn't get to it by the next time we meet:

e <- new.env()
e$a <- 2
reactive(quote(a), quoted = TRUE, env = e)

Should become something like

inject(reactive(!!new_quosure(a, e)))