Closed JMPivette closed 3 years ago
Hey,
Thanks for reporting that.
Is this something you see systematically in your apps (i.e. every time you create a golem ?) or is it only this time?
Hey It's systematic. I noticed it on my last 2 projects using golem.
Then to find the cause of the warning, I created a blank golem project and ran devtools::check()
after each command line in 01_start.R
The problem is reproducible (well at least on my computer..):
01_start.R
devtools::check()
Reprex :
colin:tmp colin$ cd /tmp
colin:tmp colin$ Rscript -e "golem::create_golem('plop')"
[...] # Removed output
colin:tmp colin$ cd plop/
colin:plop colin$ Rscript -e "devtools::check()"
[...] # Removed output
── R CMD check results ──────────────────────────────────── plop 0.0.0.9000 ────
Duration: 1m 59.4s
❯ checking DESCRIPTION meta-information ... WARNING
Spécification de licence non standard :
What license is it under?
Standardizable: FALSE
0 errors ✔ | 1 warning ✖ | 0 notes ✔
Erreur : R CMD check found WARNINGs
colin:plop colin$ Rscript -e "golem::use_utils_server()"
[...] # Removed output
── R CMD check results ──────────────────────────────────── plop 0.0.0.9000 ────
Duration: 1m 11.7s
❯ checking DESCRIPTION meta-information ... WARNING
Spécification de licence non standard :
What license is it under?
Standardizable: FALSE
❯ checking dependencies in R code ... WARNING
'::' or ':::' import not declared from: ‘rlang’
0 errors ✔ | 2 warnings ✖ | 0 notes ✔
Erreur : R CMD check found WARNINGs
This happens only with utils_server, but this doesn't make sense as there is no rlang there 🤔
Ah, I think I get it.
> rv <- shiny::reactiveValues
> rv
function (...)
{
args <- list(...)
if ((length(args) > 0) && (is.null(names(args)) || any(names(args) ==
"")))
rlang::abort("All arguments passed to reactiveValues() must be named.")
values <- .createReactiveValues(ReactiveValues$new())
.subset2(values, "impl")$mset(args)
values
}
<bytecode: 0x7ff791ca7378>
<environment: namespace:shiny>
will take the body of the functions, so when the app compiles, it has rlang::
.
Fixed via https://github.com/ThinkR-open/golem/pull/688/files
Thanks again for your feedback!
After using
golem::use_utils_server()
I get a warning when runningdevtools::check()
:It looks like
devtools::check()
doesn't like this line: https://github.com/ThinkR-open/golem/blob/6d9e4517de9a247fd823fcd606370935ece8bce0/inst/utils/golem_utils_server.R#L62If I change this line with
rv <- function(...) shiny::reactiveValues(...)
then the warning disappears.I don't really understand why this warning appears in the first place. I am using R v4.0.2, golem v0.3.1 and devtools v2.4.1