Closed lz100 closed 3 years ago
> packrat:::fileDependencies.R("app.R")
[1] "shiny" "pkg"
The lower-level logic for handling an expression: https://github.com/rstudio/packrat/blob/84cbc96726a380dfbdf601535695554241b2acb6/R/dependencies.R#L400-L464
I am been redirected from the rsconnect issue to here.
First, if I have code like this in my function, packrat treat the variable
pkg
as a real package name.Second, this code is used for checking the user environment, I don't want to install or attach the package, so that's why I use
requireNamespace
instead ofrequire
. packrat also thinks anything inrequireNamespace
is needed, but they are not.if you run
packrat:::appDependencies()
:This is a warning here, but will become an error in rsconnect and prevent my deployment.
Is there an official way to fix this instead of my hack?
Thanks!