brochure icon indicating copy to clipboard operation
brochure copied to clipboard

Creating a brochure app through golem does not import `{brochure}`

Open teofiln opened this issue 2 years ago • 2 comments

Following the Readme:

golem::create_golem("testbrochure", project_hook = brochure::golem_hook)

Creates a blank brochure app. But,

> devtools::load_all(".")
ℹ Loading testbrochure
> run_app()
Error in brochureApp(golem_add_external_resources(), home(), onStart = onStart,  : 
  could not find function "brochureApp"

And the DESCRIPTION does not import {brochure}:

Package: testbrochure
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 (>= 0.3.1),
    golem (>= 0.3.1),
    shiny (>= 1.7.1)
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1

The workaround is of course trivial,

usethis::use_package("brochure", min_version = TRUE)

but ideally this import would be declared by the function (like {golem} and {shiny})

@ColinFay Not sure if this is best filed under a {brochure} or {golem}?

teofiln avatar Apr 26 '22 03:04 teofiln

This is to be filled here, thanks :)

I'll have a look into that. If possible I'll try to avoid adding {usethis} as a dep to {brochure} .

Thanks for reporting !

ColinFay avatar Apr 26 '22 06:04 ColinFay

Thanks Colin!

Didn't mean to suggest to add usethis as a dependency. Just to mention how one can bypass the problem while a suitable solution is in place.

Thanks for writing all these incredible tools and sharing them with the community!

teofiln avatar Apr 26 '22 15:04 teofiln