-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
writeManifest()
gives confusing error if no app.R
#1098
Comments
Background: It is assumed that if you have an R script, nothing else indicates a different content type, and it is not a well-known filename (app.R, plumber.R), then it must be a standalone R script that you want to render with Quarto. See Lines 192 to 199 in 9999fdb
In general, we want Shiny applications in Lines 25 to 36 in 9999fdb
That renaming workflow doesn't work when you're trying to produce a Connect uses R -s -e 'shiny::runApp()'
#> Loading required package: shiny
#> Error in `shinyAppDir()`:
#> ! App dir must contain either app.R or server.R.
#> Backtrace:
#> ▆
#> 1. └─shiny::runApp()
#> 2. ├─shiny::as.shiny.appobj(appDir)
#> 3. └─shiny:::as.shiny.appobj.character(appDir)
#> 4. └─shiny::shinyAppDir(x)
#> 5. └─rlang::abort(...) |
We don't log the inferred app-mode nor why we made that choice. |
Slightly related - the logic captured in Lines 36 to 38 in 2fe8fde
caught me quite off-guard. I was trying to be explicit about what the primary R script was but doing so makes writeManifest insist that it is a shiny app |
i.e. create a new project with file
foo.R
containinglibrary(shiny)
, then runwriteManfiest()
:Presumably because it's using the wrong primary document, but why is it passing an R file to quarto? Should also log about the primary file.
The text was updated successfully, but these errors were encountered: