r-lib / pkgdepends

R Package Dependency Resolution
https://r-lib.github.io/pkgdepends/
Other
97 stars 30 forks source link

Resolving very slow #341

Closed courtiol closed 11 months ago

courtiol commented 11 months ago

I am not sure why, but I cannot use pkgdepends or pak since the resolve ~never~ finishes only after a very long time on one of my computers (not on the others).

E.g.

pd <- new_pkg_deps("tibble")
pd$solve()

displays "Found 1 deps for 0/1 pkgs [⠏] Resolving standard (CRAN/BioC) packages" and get stuck there for many minutes. I did check my internet connection and I don't seem to have any issue with it. I do have my packages up to date (although not the latest R on this computer).

I am happy to run tests to clarify the situation if instructed.

sessioninfo::session_info()
─ Session info ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.2.2 Patched (2022-11-10 r83330)
 os       Ubuntu 22.04.3 LTS
 system   x86_64, linux-gnu
 ui       RStudio
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       Europe/Berlin
 date     2023-10-15
 rstudio  2023.09.0+463 Desert Sunflower (desktop)
 pandoc   NA

─ Packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package     * version    date (UTC) lib source
 callr         3.7.3      2022-11-02 [1] CRAN (R 4.2.1)
 cli           3.6.1      2023-03-23 [1] CRAN (R 4.2.2)
 crayon        1.5.2      2022-09-29 [1] CRAN (R 4.2.1)
 curl          5.1.0      2023-10-02 [1] CRAN (R 4.2.2)
 desc          1.4.2      2022-09-08 [1] CRAN (R 4.2.1)
 fansi         1.0.5      2023-10-08 [1] CRAN (R 4.2.2)
 filelock      1.0.2      2018-10-05 [1] CRAN (R 4.2.2)
 glue          1.6.2      2022-02-24 [1] CRAN (R 4.2.0)
 jsonlite      1.8.7      2023-06-29 [1] CRAN (R 4.2.2)
 lifecycle     1.0.3      2022-10-07 [1] CRAN (R 4.2.1)
 lpSolve       5.6.19     2023-09-13 [1] CRAN (R 4.2.2)
 pillar        1.9.0      2023-03-22 [1] CRAN (R 4.2.2)
 pkgbuild      1.4.2      2023-06-26 [1] CRAN (R 4.2.2)
 pkgcache      2.2.0.1    2023-07-18 [1] CRAN (R 4.2.2)
 pkgdepends  * 0.6.0.9000 2023-10-15 [1] Github (r-lib/pkgdepends@9718c02)
 prettyunits   1.2.0      2023-09-24 [1] CRAN (R 4.2.2)
 processx      3.8.2      2023-06-30 [1] CRAN (R 4.2.2)
 ps            1.7.5      2023-04-18 [1] CRAN (R 4.2.2)
 R6            2.5.1      2021-08-19 [1] CRAN (R 4.2.0)
 rappdirs      0.3.3      2021-01-31 [1] CRAN (R 4.2.0)
 rlang         1.1.1      2023-04-28 [1] CRAN (R 4.2.2)
 rprojroot     2.0.3      2022-04-02 [1] CRAN (R 4.2.0)
 rstudioapi    0.15.0     2023-07-07 [1] CRAN (R 4.2.2)
 sessioninfo   1.2.2      2021-12-06 [1] CRAN (R 4.2.0)
 utf8          1.2.3      2023-01-31 [1] CRAN (R 4.2.2)
 vctrs         0.6.4      2023-10-12 [1] CRAN (R 4.2.2)
 zip           2.3.0      2023-04-17 [1] CRAN (R 4.2.2)

 [1] /home/courtiol/R/x86_64-pc-linux-gnu-library/4.2
 [2] /usr/local/lib/R/site-library
 [3] /usr/lib/R/site-library
 [4] /usr/lib/R/library
gaborcsardi commented 11 months ago

What is getOption("repos")?

courtiol commented 11 months ago
> getOption("repos")
                         CRAN 
"https://cloud.r-project.org" 
courtiol commented 11 months ago

OK, I did let it run for longer, and it does work but it takes many minutes, while on the other computers it is very fast.

courtiol commented 11 months ago

It is faster now, so perhaps it was a glitch of the network after all. I close and will reopen the issue only if it resurfaces. Sorry for the bother...

courtiol commented 11 months ago

FYI: I have problems with R CMD check too that may be related to the problem:

* checking CRAN incoming feasibility ...Warning: unable to access index for repository https://bioconductor.org/packages/3.16/bioc/src/contrib:
  cannot open URL 'https://bioconductor.org/packages/3.16/bioc/src/contrib/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.16/data/annotation/src/contrib:
  cannot open URL 'https://bioconductor.org/packages/3.16/data/annotation/src/contrib/PACKAGES'

This seems to be caused by me using R 4.2 which looks for bioconductor old addresses that no longer seem up and running.