Skip to content

Commit

Permalink
Improve calculation of package set difference
Browse files Browse the repository at this point in the history
Avoids downloading and deploying R packages already contained in the
shiny base image.
  • Loading branch information
georgestagg committed May 3, 2024
1 parent f24ed97 commit 385814e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/packages.R
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ prepare_wasm_metadata <- function(pkg, metadata, verbose) {
download_wasm_packages <- function(appdir, destdir, verbose, package_cache) {
verbose_print <- if (verbose) message else list
# App dependencies, ignoring shiny packages in base webR image
shiny_pkgs <- resolve_dependencies(c("shiny", "bslib", "renv"), verbose)
pkgs <- unique(renv::dependencies(appdir, quiet = !verbose)$Package)
pkgs <- pkgs[pkgs != "shiny" & pkgs != "bslib"]
if (length(pkgs) > 0) {
pkgs <- resolve_dependencies(pkgs, verbose)
pkgs <- resolve_dependencies(pkgs, verbose) |> setdiff(shiny_pkgs)
}

if (verbose) {
Expand Down

0 comments on commit 385814e

Please sign in to comment.