Skip to content

Commit

Permalink
Use use_bioconductor configuration option when creating cache in `R…
Browse files Browse the repository at this point in the history
…/cache.R` Fix #295
  • Loading branch information
meztez authored Sep 25, 2024
1 parent 78e40fa commit a5cf318
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# pak (development version)

* Use `use_bioconductor` configuration option when creating cache in `R/cache.R` (https://github.com/r-lib/pak/issues/295, @meztez).

# pak 0.8.0

* `pkg_deps()` now accepts a vector of package names.
Expand Down
12 changes: 8 additions & 4 deletions R/cache.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ meta_summary_internal <- function() {
cmc <- pkgcache::cranlike_metadata_cache$new(
platforms = pkgdepends::current_config()$get("platforms"),
cran_mirror = pkgdepends::current_config()$get("cran_mirror"),
r_version = pkgdepends::current_config()$get("r_versions")
r_version = pkgdepends::current_config()$get("r_versions"),
bioc = pkgdepends::current_config()$get("use_bioconductor")

Check warning on line 164 in R/cache.R

View check run for this annotation

Codecov / codecov/patch

R/cache.R#L163-L164

Added lines #L163 - L164 were not covered by tests
)
ret <- cmc$summary()
list(
Expand Down Expand Up @@ -207,7 +208,8 @@ meta_list_internal <- function(pkg) {
cmc <- pkgcache::cranlike_metadata_cache$new(
platforms = pkgdepends::current_config()$get("platforms"),
cran_mirror = pkgdepends::current_config()$get("cran_mirror"),
r_version = pkgdepends::current_config()$get("r_versions")
r_version = pkgdepends::current_config()$get("r_versions"),
bioc = pkgdepends::current_config()$get("use_bioconductor")

Check warning on line 212 in R/cache.R

View check run for this annotation

Codecov / codecov/patch

R/cache.R#L211-L212

Added lines #L211 - L212 were not covered by tests
)
cmc$list(packages = pkg)
}
Expand Down Expand Up @@ -241,7 +243,8 @@ meta_update_internal <- function() {
cmc <- pkgcache::cranlike_metadata_cache$new(
platforms = pkgdepends::current_config()$get("platforms"),
cran_mirror = pkgdepends::current_config()$get("cran_mirror"),
r_version = pkgdepends::current_config()$get("r_versions")
r_version = pkgdepends::current_config()$get("r_versions"),
bioc = pkgdepends::current_config()$get("use_bioconductor")

Check warning on line 247 in R/cache.R

View check run for this annotation

Codecov / codecov/patch

R/cache.R#L246-L247

Added lines #L246 - L247 were not covered by tests
)
cmc$update()
invisible()
Expand Down Expand Up @@ -284,7 +287,8 @@ meta_clean_internal <- function() {
cmc <- pkgcache::cranlike_metadata_cache$new(
platforms = pkgdepends::current_config()$get("platforms"),
cran_mirror = pkgdepends::current_config()$get("cran_mirror"),
r_version = pkgdepends::current_config()$get("r_versions")
r_version = pkgdepends::current_config()$get("r_versions"),
bioc = pkgdepends::current_config()$get("use_bioconductor")

Check warning on line 291 in R/cache.R

View check run for this annotation

Codecov / codecov/patch

R/cache.R#L290-L291

Added lines #L290 - L291 were not covered by tests
)
cmc$cleanup(force = TRUE)
}

0 comments on commit a5cf318

Please sign in to comment.