shiny icon indicating copy to clipboard operation
shiny copied to clipboard

Allow a field in the DESCRIPTION to disable autoload

Open ColinFay opened this issue 4 years ago • 3 comments

It would be clean to allow to disable autoload of R files using a field in the DESCRIPTION file.

Something like:

Package: shinyexample
Title: An Amazing Shiny App
Version: 0.0.0.9000
Authors@R: 
    person(given = "firstname",
           family = "lastname",
           role = c("aut", "cre"),
           email = "[email protected]")
Description: What the package does (one paragraph).
License: What license is it under?
Imports: 
    config,
    golem,
    shiny
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1
DisableAutoload: true

ColinFay avatar Apr 17 '21 22:04 ColinFay

Has shiny decided to officially endorse using a package structure for a shiny app?

daattali avatar Apr 30 '21 04:04 daattali

Have they ?

anirbanshaw24 avatar Aug 28 '24 16:08 anirbanshaw24

I like this idea! It seems like a great fit for a package like golem to handle. The convention around these kinds of settings in DESCRIPTION files is to use Config/{package}/{setting}. I'd recommend golem use

Config/golem/autoreload: true

# or
Config/golem/autoreload: false

AFAIK, shiny doesn't have any tooling that inspects package metadata at runtime. Without that precedent it's not likely this feature is something shiny would provide directly. That said, it'd be confusing to users if golem used Config/shiny/autoreload and could cause conflicts down the road.

gadenbuie avatar Aug 28 '24 17:08 gadenbuie