rstudio / shinymeta

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

Avoid shiny deprecation messages about quoted/env arguments #96

Closed jcheng5 closed 3 years ago

jcheng5 commented 3 years ago

~For next time, explore having the AST walking logic convert quosures to expressions (just drop the environment part). This relies on app authors being careful to have quosure logic not depend on their environments, but, that's already something we require them to do when crafting metaReactive/metaExpr/etc. objects. shinymeta just pastes expressions together, the onus is on the app author to ensure that the expressions work when turned into scripts.~

jcheng5 commented 3 years ago

For next time, figure out why metaRender tests don't pass. Minimal shinymeta-less repro:

library(shiny)

ui <- fluidPage(
  textOutput("txt1")
)

server <- function(input, output, session) {
  x <- "hello"
  my_quo <- rlang::quo(x)
  output$txt1 <- renderText(my_quo, quoted = TRUE)
}

shinyApp(ui, server)
cpsievert commented 3 years ago

Filed issue here https://github.com/rstudio/shiny/issues/3360

jcheng5 commented 3 years ago

Turns out shiny needed https://github.com/rstudio/shiny/pull/3373 for metaRender to work correctly with rlang::inject and nested quosures.