Skip to content

Allow/forcing project package to be included in renv.lock #2285

@daattali

Description

@daattali

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions