Closed zsigmas closed 6 months ago
Thanks for the report. Is your Shiny code in an app.R, or in a package? If app.R, what editor are you using and how exactly are you launching the app?
Hello Joe,
Thanks for your quick answer!
The app is contained in a package and effectively, what I am calling is shinyApp with a bit of golem which boils down to this:
exported_run_app <- function(...){
### Some code to customize the ui and server functions
golem::with_golem_options(
app = shiny::shinyApp(
ui = ui_func,
server = server_func,
enableBookmarking = "url"
),
golem_opts = option_list
)
}
The app would be called with:
my_package::exported_run_app(my_customizing_parameters)
Let me know if you need any more information
OK. It seems like the package is being built without srcrefs. There’s an option to turn it on if you’re building in RStudio: https://community.rstudio.com/t/why-should-i-build-with-with-keep-source/52542
Thanks a lot. I am creating some packages that use shinymeta and are imported by the main package, the one running the app. Should those packages also be built using the keep source option?
Sounds complicated... what I'd actually do is, when calling metaReactive()
and similar functions from any package, pass in an explicit varname
argument. This frees shinymeta from having to look at the source refs at all.
For example:
my_data <- metaReactive({
# code goes here...
}, varname = "my_data")
Understood, thanks a lot Joe!
Following shinymeta advice:
Warning: Unable to infer variable name for metaReactive because no srcref is available. Please report an issue to https://github.com/rstudio/shinymeta/issues/new
What information do you need on my side for addressing this?
Thanks!