Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@

# Require 2.0.0.9034 (development version)

* `getCRANrepos()` now also de-duplicates `getOption("repos")` (dropping
duplicate repo URLs, keeping the first occurrence to preserve names) in
addition to stripping the resolved `@CRAN@` placeholder, updating the global
`repos` option in place so downstream resolvers don't query the same repo
twice. Centralizes repo cleanup that previously lived in
`SpaDES.project::setupProject()`.

* Resilience to the transient
`cannot open URL 'http://bioconductor.org/config.yaml'` failure. pak/pkgcache
fetch the Bioconductor config at startup, and the entire pak call dies when
Expand Down Expand Up @@ -95,8 +103,6 @@
`?RequireOptions`. (Flows through `SpaDES.project::setupProject()` via
`options = list(Require.noRemotes = TRUE)`.)

# Require 2.0.0.9027 (development version)

* A pinned GitHub commit (`Install("owner/repo@<sha>")`) is now treated as an
exact-version pin under pak: it installs that exact commit even when a
*different* version is already installed (previously a bare `@sha` was a no-op
Expand All @@ -108,8 +114,6 @@
qualify (`isExplicitShaPin()`); branch refs, `(HEAD)` refs, and refs already
carrying a version spec are unaffected.

# Require 2.0.0.9026 (development version)

* Performance: the offline (pak download-cache) install path no longer degrades
to slow one-at-a-time installs when the resolved set contains a package as
both a CRAN ref and a GitHub ref (e.g. `SpaDES.tools (>= 2.0.0)` plus
Expand Down
10 changes: 6 additions & 4 deletions R/CRAN.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@ getCRANrepos <- function(repos = NULL, ind) {
repos <- getCRANrepos(repos, 1)
}
}
# Clean up the global repos option: drop the "@CRAN@" placeholder (now
# resolved above) and any duplicate repo URLs so downstream resolvers don't
# query the same repo twice. Keep the first occurrence to preserve names.
reposNow <- getOption("repos")
hasAts <- reposNow %in% "@CRAN@"
if (isTRUE(any(hasAts))) {
options(repos = reposNow[!hasAts])
keep <- !(reposNow %in% "@CRAN@") & !duplicated(unname(reposNow))
if (!all(keep)) {
options(repos = reposNow[keep])
}


return(repos)
}

Expand Down
Loading