r-lib / remotes

Install R packages from GitHub, GitLab, Bitbucket, git, svn repositories, URLs
https://remotes.r-lib.org/
Other
331 stars 152 forks source link

Package dependencies on Bioconductor are stuck at outdated versions #668

Closed bersbersbers closed 2 years ago

bersbersbers commented 2 years ago

To reproduce, use this example DESCRIPTION file:

Package: Bug
Version: 0.1
biocViews:
Imports: S4Vectors

Running

remove.packages("S4Vectors")
remotes::install_local(force=TRUE)
remotes::update_packages()
print(BiocManager::valid()$out_of_date)

gives

          Package     LibPath                           Installed Built   ReposVer Repository                                               
S4Vectors "S4Vectors" "/data2/bers/opt/R/4.1/library" "0.30.2"  "4.1.2" "0.32.2" "https://bioconductor.org/packages/3.14/bioc/src/contrib"

while then running

BiocManager::install(ask = FALSE)
print(BiocManager::valid()$out_of_date)

updates S4Vector, retuning NULL.

I tried #666 (compare #664) via devtools::install_github("https://github.com/r-lib/remotes/pull/666"), but this did not fix the issue.

bersbersbers commented 2 years ago

Investigating this further, I was wrong - this is fixed by #666. I believe my problem was that I did not restart R after updating remotes. To see what went wrong:

install.packages("remotes")
remotes:::bioc_version("4.1") # gives 3.13
devtools::install_github("https://github.com/r-lib/remotes/pull/666")
remotes:::bioc_version("4.1") # still gives 3.13

Restarting R:

remotes:::bioc_version("4.1") # gives 3.14!