I'm developing a shiny app contained within a package, and want to deploy the shiny app to shinyapps.io via {rsconnect}. In order for the deployment to be successful, all the dependencies of the package and the package itself need to be listed in the renv.lock file, so it can be installed.
Currently, renv::snapshot() automatically prunes the "root" package from the lockfile, and I've tried many hacky ways to overcome it. Even if I add a R/deps.R that loads the package, {renv} is smart enough to ignore it. If I manually add it with renv::record("user/repo"), when I then call renv::snapshot() the package gets removed from the lockfile.
This is a problem because the package itself does need to be in renv so that the remote server (shinyapps.io) will know to install this package.
I could not find any flag, parameter, or workaround. Is it possible to do this, or would you consider adding such a mechanism?
I'm developing a shiny app contained within a package, and want to deploy the shiny app to shinyapps.io via {rsconnect}. In order for the deployment to be successful, all the dependencies of the package and the package itself need to be listed in the renv.lock file, so it can be installed.
Currently,
renv::snapshot()automatically prunes the "root" package from the lockfile, and I've tried many hacky ways to overcome it. Even if I add aR/deps.Rthat loads the package, {renv} is smart enough to ignore it. If I manually add it withrenv::record("user/repo"), when I then callrenv::snapshot()the package gets removed from the lockfile.This is a problem because the package itself does need to be in renv so that the remote server (shinyapps.io) will know to install this package.
I could not find any flag, parameter, or workaround. Is it possible to do this, or would you consider adding such a mechanism?