Skip to content

Warnings from {golem} apps #264

@schloerke

Description

@schloerke

From #245 (comment)

In addition: Warning messages:
1: In shiny::loadSupport(app_dir, renv = renv, globalrenv = globalrenv) :
Loading R/ subdirectory for Shiny application, but this directory appears to contain an R package. Sourcing files in R/ may cause unexpected behavior.

Looking at reprex Shiny golem package: https://github.com/whipson/shinytest2reprex

tree:

.
├── DESCRIPTION
├── NAMESPACE
├── R
│   ├── _disable_autoload.R
│   ├── app_config.R
│   ├── app_server.R
│   ├── app_ui.R
│   └── run_app.R
├── app.R
├── dev
│   ├── 01_start.R
│   ├── 02_dev.R
│   ├── 03_deploy.R
│   └── run_dev.R
├── inst
│   ├── app
│   │   └── www
│   │       └── favicon.ico
│   └── golem-config.yml
├── man
│   └── run_app.Rd
├── shinytest2reprex.Rproj
└── tests
    ├── testthat
    │   ├── setup.R
    │   └── test-shinytest2.R
    └── testthat.R

8 directories, 19 files

DESCRIPTION file:

Package: shinytest2reprex
Title: An Amazing Shiny App
Version: 0.0.0.9000
Authors@R:
    person(given = "firstname",
           family = "lastname",
           role = c("aut", "cre"),
           email = "your@email.com")
Description: What the package does (one paragraph).
License: What license is it under?
Imports:
    config (>= 0.3.1),
    golem (>= 0.3.2),
    pkgload,
    shiny (>= 1.7.1)
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.0
Suggests:
    shinytest2

app.R

# Launch the ShinyApp (Do not remove this comment)
# To deploy, run: rsconnect::deployApp()
# Or use the blue button on top of this file

pkgload::load_all(export_all = FALSE,helpers = FALSE,attach_testthat = FALSE)
options( "golem.app.prod" = TRUE)
shinytest2reprex::run_app() # add parameters here (if any)

shinytest2reprex::run_app() returns a shiny object, it does NOT call a shiny::runApp().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions