Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git fetch now robust to tree order #342

Merged
merged 5 commits into from
Oct 23, 2023

Conversation

jameslairdsmith
Copy link
Contributor

As it stands, the pkgdepends code for unpacking git repo packfiles is sensitive to the order of the trees (#339). This doesn't seem to matter for git hosts that provide the trees in the order of deepest roots first but for those that don't the current unpacking code will provide incorrect results. This problem occurs for repos hosted on Azure DevOps, for example, where I've been experiencing it at the Bank of England's self-hosted version of Azure DevOps Server.

I previously couldn't produce a reprex, but I've now set up a publicly accessible project (https://dev.azure.com/jameslairdsmith/Test) on Azure DevOps Cloud for testing. I've also cloned the Github version of dplyr, which anyone should be able to clone from https://[email protected]/jameslairdsmith/Test/_git/dplyr. And so:

library(pkgdepends)
library(withr)
library(pkgcache)
#> 
#> Attaching package: 'pkgcache'
#> The following objects are masked from 'package:pkgdepends':
#> 
#>     current_r_platform, default_platforms

install_azure_devops <- function() {
  pkgcache::pkg_cache_delete_files()
  lib <- local_tempdir()
  cache_dir <- local_tempdir()
  
  pdi <- new_pkg_installation_proposal(
    "git::https://[email protected]/jameslairdsmith/Test/_git/dplyr",
    config = list(library = lib, metadata_cache_dir = cache_dir)
  )
  
  pdi$solve()
  pdi$download()
  pdi$install()
}

install_azure_devops()
#> ℹ Loading metadata database
#> ✔ Loading metadata database ... done
#> 
#> ℹ Getting 16 pkgs (8.11 MB) and 1 pkg with unknown size
#> ✔ Got R6 2.5.1 (x86_64-apple-darwin17.0) (82.53 kB)
#> ✔ Got generics 0.1.3 (x86_64-apple-darwin17.0) (77.52 kB)
#> ✔ Got ellipsis 0.3.2 (x86_64-apple-darwin17.0) (36.50 kB)
#> ✔ Got glue 1.6.2 (x86_64-apple-darwin17.0) (151.98 kB)
#> ✔ Got tidyselect 1.2.0 (x86_64-apple-darwin17.0) (219.38 kB)
#> ✔ Got utf8 1.2.3 (x86_64-apple-darwin17.0) (196.91 kB)
#> ✔ Got withr 2.5.0 (x86_64-apple-darwin17.0) (229.10 kB)
#> ✔ Got fansi 1.0.4 (x86_64-apple-darwin17.0) (364.15 kB)
#> ✔ Got lifecycle 1.0.3 (x86_64-apple-darwin17.0) (121.58 kB)
#> ✔ Got pkgconfig 2.0.3 (x86_64-apple-darwin17.0) (17.78 kB)
#> ✔ Got magrittr 2.0.3 (x86_64-apple-darwin17.0) (227.50 kB)
#> ✔ Got cli 3.6.1 (x86_64-apple-darwin17.0) (1.37 MB)
#> ✔ Got tibble 3.2.1 (x86_64-apple-darwin17.0) (676.42 kB)
#> ✔ Got pillar 1.9.0 (x86_64-apple-darwin17.0) (644.43 kB)
#> ✔ Got vctrs 0.6.2 (x86_64-apple-darwin17.0) (1.85 MB)
#> ✔ Got dplyr 1.0.4 (source) (96 B)
#> ✔ Got rlang 1.1.1 (x86_64-apple-darwin17.0) (1.85 MB)
#> ✔ Installed R6 2.5.1  (139ms)
#> ✔ Installed cli 3.6.1  (157ms)
#> ✔ Installed ellipsis 0.3.2  (183ms)
#> ✔ Installed fansi 1.0.4  (243ms)
#> ✔ Installed generics 0.1.3  (253ms)
#> ✔ Installed glue 1.6.2  (267ms)
#> ✔ Installed lifecycle 1.0.3  (275ms)
#> ✔ Installed magrittr 2.0.3  (318ms)
#> ✔ Installed pillar 1.9.0  (80ms)
#> ✔ Installed pkgconfig 2.0.3  (57ms)
#> ✔ Installed rlang 1.1.1  (33ms)
#> ✔ Installed tibble 3.2.1  (35ms)
#> ✔ Installed tidyselect 1.2.0  (23ms)
#> ✔ Installed utf8 1.2.3  (23ms)
#> ✔ Installed vctrs 0.6.2  (42ms)
#> ✔ Installed withr 2.5.0  (22ms)
#> ℹ Packaging dplyr 1.0.4
#> ✔ Packaged dplyr 1.0.4 (2s)
#> ℹ Building dplyr 1.0.4
#> ✖ Failed to build dplyr 1.0.4
#> Error in "stop_task_build(state, worker)": ! Failed to build source package 'dplyr'

Created on 2023-10-21 with reprex v2.0.2

Standard output and standard error
Warning message:
In do_once((if (is_R_CMD_check()) stop else warning)("The function xfun::isFALSE() will be deprecated in the future. Please ",  :
  The function xfun::isFALSE() will be deprecated in the future. Please consider using base::isFALSE(x) or identical(x, FALSE) instead.
Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.1.2 (2021-11-01)
#>  os       macOS Big Sur 10.16
#>  system   x86_64, darwin17.0
#>  ui       X11
#>  language (EN)
#>  collate  en_GB.UTF-8
#>  ctype    en_GB.UTF-8
#>  tz       Europe/London
#>  date     2023-10-21
#>  pandoc   2.14.2 @ /Applications/RStudio.app/Contents/MacOS/pandoc/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version    date (UTC) lib source
#>  callr         3.7.3.9001 2023-10-15 [1] Github (r-lib/callr@e3e0acf)
#>  cli           3.6.1      2023-03-23 [1] CRAN (R 4.1.2)
#>  crayon        1.4.2      2021-10-29 [1] CRAN (R 4.1.0)
#>  curl          5.0.2      2023-08-14 [1] CRAN (R 4.1.2)
#>  debugme       1.1.0      2017-10-22 [1] CRAN (R 4.1.0)
#>  desc          1.4.0      2021-09-28 [1] CRAN (R 4.1.0)
#>  digest        0.6.29     2021-12-01 [1] CRAN (R 4.1.0)
#>  evaluate      0.16       2022-08-09 [1] CRAN (R 4.1.2)
#>  fansi         1.0.3      2022-03-24 [1] CRAN (R 4.1.2)
#>  fastmap       1.1.0      2021-01-25 [1] CRAN (R 4.1.0)
#>  filelock      1.0.2      2018-10-05 [1] CRAN (R 4.1.0)
#>  fs            1.5.2      2021-12-08 [1] CRAN (R 4.1.0)
#>  glue          1.6.2      2022-02-24 [1] CRAN (R 4.1.2)
#>  highr         0.9        2021-04-16 [1] CRAN (R 4.1.0)
#>  htmltools     0.5.6      2023-08-10 [1] CRAN (R 4.1.2)
#>  jsonlite      1.8.7      2023-06-29 [1] CRAN (R 4.1.2)
#>  knitr         1.36       2021-09-29 [1] CRAN (R 4.1.0)
#>  lifecycle     1.0.3      2022-10-07 [1] CRAN (R 4.1.2)
#>  lpSolve       5.6.15     2020-01-24 [1] CRAN (R 4.1.0)
#>  magrittr      2.0.3      2022-03-30 [1] CRAN (R 4.1.2)
#>  pillar        1.9.0      2023-03-22 [1] CRAN (R 4.1.2)
#>  pkgbuild      1.3.1      2021-12-20 [1] CRAN (R 4.1.0)
#>  pkgcache    * 2.2.0.1    2023-07-18 [1] CRAN (R 4.1.2)
#>  pkgconfig     2.0.3      2019-09-22 [1] CRAN (R 4.1.0)
#>  pkgdepends  * 0.6.0.9000 2023-10-21 [1] Github (r-lib/pkgdepends@9718c02)
#>  prettyunits   1.1.1      2020-01-24 [1] CRAN (R 4.1.0)
#>  processx      3.8.2      2023-06-30 [1] CRAN (R 4.1.2)
#>  ps            1.6.0      2021-02-28 [1] CRAN (R 4.1.0)
#>  purrr         1.0.2      2023-08-10 [1] CRAN (R 4.1.2)
#>  R.cache       0.16.0     2022-07-21 [1] CRAN (R 4.1.2)
#>  R.methodsS3   1.8.1      2020-08-26 [1] CRAN (R 4.1.0)
#>  R.oo          1.24.0     2020-08-26 [1] CRAN (R 4.1.0)
#>  R.utils       2.11.0     2021-09-26 [1] CRAN (R 4.1.0)
#>  R6            2.5.1      2021-08-19 [1] CRAN (R 4.1.0)
#>  rappdirs      0.3.3      2021-01-31 [1] CRAN (R 4.1.0)
#>  reprex        2.0.2      2022-08-17 [1] CRAN (R 4.1.2)
#>  rlang         1.1.1      2023-04-28 [1] CRAN (R 4.1.2)
#>  rmarkdown     2.18       2022-11-09 [1] CRAN (R 4.1.2)
#>  rprojroot     2.0.2      2020-11-15 [1] CRAN (R 4.1.0)
#>  rstudioapi    0.14       2022-08-22 [1] CRAN (R 4.1.2)
#>  sessioninfo   1.2.2      2021-12-06 [1] CRAN (R 4.1.0)
#>  stringi       1.7.6      2021-11-29 [1] CRAN (R 4.1.0)
#>  stringr       1.5.0      2022-12-02 [1] CRAN (R 4.1.2)
#>  styler        1.7.0      2022-03-13 [1] CRAN (R 4.1.2)
#>  tibble        3.2.1      2023-03-20 [1] CRAN (R 4.1.2)
#>  utf8          1.2.2      2021-07-24 [1] CRAN (R 4.1.0)
#>  vctrs         0.6.3      2023-06-14 [1] CRAN (R 4.1.2)
#>  withr       * 2.5.0      2022-03-03 [1] CRAN (R 4.1.2)
#>  xfun          0.40       2023-08-09 [1] CRAN (R 4.1.2)
#>  yaml          2.2.1      2020-02-01 [1] CRAN (R 4.1.0)
#>  zip           2.3.0      2023-04-17 [1] CRAN (R 4.1.2)
#> 
#>  [1] /Library/Frameworks/R.framework/Versions/4.1/Resources/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────

When I try it interactively, I get the following extra output from the child process:

! Failed to build source package 'dplyr', stdout + stderr (last 10 lines):

OE> *** installing help indices
OE> ** building package indices
OE> ** testing if installed package can be loaded
OE> Warning: S3 methods ‘$<-.grouped_df’, ‘[.fun_list’, ‘[.grouped_df’, ‘[.rowwise_df’, ‘[<-.grouped_df’, ‘[<-.rowwise_df’, ‘[[<-.grouped_df’, ‘names<-.grouped_df’, ‘names<-.rowwise_df’, ‘anti_join.data.frame’, ‘arrange.data.frame’, ‘arrange_.data.frame’, ‘arrange_.tbl_df’, ‘as.data.frame.grouped_df’, ‘as.tbl.data.frame’, ‘as.tbl.tbl’, ‘as_tibble.grouped_df’, ‘as_tibble.rowwise_df’, ‘auto_copy.data.frame’, ‘cbind.grouped_df’, ‘collapse.data.frame’, ‘collect.data.frame’, ‘common_by.NULL’, ‘common_by.character’, ‘common_by.default’, ‘common_by.list’, ‘compute.data.frame’, ‘copy_to.DBIConnection’, ‘copy_to.src_local’, ‘count.data.frame’, ‘default_missing.data.frame’, ‘default_missing.default’, ‘distinct.data.frame’, ‘distinct_.data.frame’, ‘distinct_.grouped_df’, ‘distinct_.tbl_df’, ‘do.NULL’, ‘do.data.frame’, ‘do.grouped_df’, ‘do.rowwise_df’,  [... truncated]
OE> Error: package or namespace load failed for ‘dplyr’ in library.dynam(lib, package, package.lib):
OE>  shared object ‘dplyr.so’ not found
OE> Error: loading failed
OE> Execution halted
OE> ERROR: loading failed
OE> * removing ‘/private/var/folders/nz/1d4qvqxn19x8cx0kd4k_7d4r0000gn/T/RtmpKS72Co/pkg-lib1345850d32a22/dplyr’

This PR introduces a new sort_trees() step into unpack_packfile_repo(). sort_trees() uses the frequency of the hashes throughout the packfile to sort the trees from deepest (the root tree) to the least deep. It's the simplest way I could think of to get the desired result with minimal code change. I'm of course open to an easier approach if there is one.
When I run the above reprex with my "sort-trees" branch it works as expected.

library(pkgdepends)
library(withr)
library(pkgcache)
#> 
#> Attaching package: 'pkgcache'
#> The following objects are masked from 'package:pkgdepends':
#> 
#>     current_r_platform, default_platforms

install_azure_devops <- function() {
  pkgcache::pkg_cache_delete_files()
  lib <- local_tempdir()
  cache_dir <- local_tempdir()
  
  pdi <- new_pkg_installation_proposal(
    "git::https://[email protected]/jameslairdsmith/Test/_git/dplyr",
    config = list(library = lib, metadata_cache_dir = cache_dir)
  )
  
  pdi$solve()
  pdi$download()
  pdi$install()
}

install_azure_devops()
#> ℹ Loading metadata database
#> ✔ Loading metadata database ... done
#> 
#> ℹ Getting 16 pkgs (8.11 MB) and 1 pkg with unknown size
#> ✔ Got ellipsis 0.3.2 (x86_64-apple-darwin17.0) (36.50 kB)
#> ✔ Got R6 2.5.1 (x86_64-apple-darwin17.0) (82.53 kB)
#> ✔ Got pkgconfig 2.0.3 (x86_64-apple-darwin17.0) (17.78 kB)
#> ✔ Got generics 0.1.3 (x86_64-apple-darwin17.0) (77.52 kB)
#> ✔ Got glue 1.6.2 (x86_64-apple-darwin17.0) (151.98 kB)
#> ✔ Got fansi 1.0.4 (x86_64-apple-darwin17.0) (364.15 kB)
#> ✔ Got tidyselect 1.2.0 (x86_64-apple-darwin17.0) (219.38 kB)
#> ✔ Got utf8 1.2.3 (x86_64-apple-darwin17.0) (196.91 kB)
#> ✔ Got lifecycle 1.0.3 (x86_64-apple-darwin17.0) (121.58 kB)
#> ✔ Got withr 2.5.0 (x86_64-apple-darwin17.0) (229.10 kB)
#> ✔ Got magrittr 2.0.3 (x86_64-apple-darwin17.0) (227.50 kB)
#> ✔ Got cli 3.6.1 (x86_64-apple-darwin17.0) (1.37 MB)
#> ✔ Got pillar 1.9.0 (x86_64-apple-darwin17.0) (644.43 kB)
#> ✔ Got tibble 3.2.1 (x86_64-apple-darwin17.0) (676.42 kB)
#> ✔ Got rlang 1.1.1 (x86_64-apple-darwin17.0) (1.85 MB)
#> ✔ Got vctrs 0.6.2 (x86_64-apple-darwin17.0) (1.85 MB)
#> ✔ Got dplyr 1.0.4 (source) (96 B)
#> ✔ Installed R6 2.5.1  (151ms)
#> ✔ Installed cli 3.6.1  (171ms)
#> ✔ Installed ellipsis 0.3.2  (200ms)
#> ✔ Installed fansi 1.0.4  (213ms)
#> ✔ Installed generics 0.1.3  (224ms)
#> ✔ Installed glue 1.6.2  (286ms)
#> ✔ Installed lifecycle 1.0.3  (297ms)
#> ✔ Installed magrittr 2.0.3  (339ms)
#> ✔ Installed pillar 1.9.0  (102ms)
#> ✔ Installed pkgconfig 2.0.3  (62ms)
#> ✔ Installed rlang 1.1.1  (35ms)
#> ✔ Installed tibble 3.2.1  (37ms)
#> ✔ Installed tidyselect 1.2.0  (26ms)
#> ✔ Installed utf8 1.2.3  (25ms)
#> ✔ Installed vctrs 0.6.2  (49ms)
#> ✔ Installed withr 2.5.0  (25ms)
#> ℹ Packaging dplyr 1.0.4
#> ✔ Packaged dplyr 1.0.4 (11.9s)
#> ℹ Building dplyr 1.0.4
#> ✔ Built dplyr 1.0.4 (8.7s)
#> ✔ Installed dplyr 1.0.4 (git::https://[email protected]/jameslairdsmith/Test/_git/dplyr@73720b8) (26ms)
#> ✔ Summary:  ✨ 17 new  in 11s

Created on 2023-10-21 with reprex v2.0.2

Standard output and standard error
Warning message:
In do_once((if (is_R_CMD_check()) stop else warning)("The function xfun::isFALSE() will be deprecated in the future. Please ",  :
  The function xfun::isFALSE() will be deprecated in the future. Please consider using base::isFALSE(x) or identical(x, FALSE) instead.
Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.1.2 (2021-11-01)
#>  os       macOS Big Sur 10.16
#>  system   x86_64, darwin17.0
#>  ui       X11
#>  language (EN)
#>  collate  en_GB.UTF-8
#>  ctype    en_GB.UTF-8
#>  tz       Europe/London
#>  date     2023-10-21
#>  pandoc   2.14.2 @ /Applications/RStudio.app/Contents/MacOS/pandoc/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version    date (UTC) lib source
#>  callr         3.7.3.9001 2023-10-15 [1] Github (r-lib/callr@e3e0acf)
#>  cli           3.6.1      2023-03-23 [1] CRAN (R 4.1.2)
#>  crayon        1.4.2      2021-10-29 [1] CRAN (R 4.1.0)
#>  curl          5.0.2      2023-08-14 [1] CRAN (R 4.1.2)
#>  debugme       1.1.0      2017-10-22 [1] CRAN (R 4.1.0)
#>  desc          1.4.0      2021-09-28 [1] CRAN (R 4.1.0)
#>  digest        0.6.29     2021-12-01 [1] CRAN (R 4.1.0)
#>  evaluate      0.16       2022-08-09 [1] CRAN (R 4.1.2)
#>  fansi         1.0.3      2022-03-24 [1] CRAN (R 4.1.2)
#>  fastmap       1.1.0      2021-01-25 [1] CRAN (R 4.1.0)
#>  filelock      1.0.2      2018-10-05 [1] CRAN (R 4.1.0)
#>  fs            1.5.2      2021-12-08 [1] CRAN (R 4.1.0)
#>  glue          1.6.2      2022-02-24 [1] CRAN (R 4.1.2)
#>  highr         0.9        2021-04-16 [1] CRAN (R 4.1.0)
#>  htmltools     0.5.6      2023-08-10 [1] CRAN (R 4.1.2)
#>  jsonlite      1.8.7      2023-06-29 [1] CRAN (R 4.1.2)
#>  knitr         1.36       2021-09-29 [1] CRAN (R 4.1.0)
#>  lifecycle     1.0.3      2022-10-07 [1] CRAN (R 4.1.2)
#>  lpSolve       5.6.15     2020-01-24 [1] CRAN (R 4.1.0)
#>  magrittr      2.0.3      2022-03-30 [1] CRAN (R 4.1.2)
#>  pillar        1.9.0      2023-03-22 [1] CRAN (R 4.1.2)
#>  pkgbuild      1.3.1      2021-12-20 [1] CRAN (R 4.1.0)
#>  pkgcache    * 2.2.0.1    2023-07-18 [1] CRAN (R 4.1.2)
#>  pkgconfig     2.0.3      2019-09-22 [1] CRAN (R 4.1.0)
#>  pkgdepends  * 0.6.0.9000 2023-10-21 [1] Github (jameslairdsmith/pkgdepends@66155e0)
#>  prettyunits   1.1.1      2020-01-24 [1] CRAN (R 4.1.0)
#>  processx      3.8.2      2023-06-30 [1] CRAN (R 4.1.2)
#>  ps            1.6.0      2021-02-28 [1] CRAN (R 4.1.0)
#>  purrr         1.0.2      2023-08-10 [1] CRAN (R 4.1.2)
#>  R.cache       0.16.0     2022-07-21 [1] CRAN (R 4.1.2)
#>  R.methodsS3   1.8.1      2020-08-26 [1] CRAN (R 4.1.0)
#>  R.oo          1.24.0     2020-08-26 [1] CRAN (R 4.1.0)
#>  R.utils       2.11.0     2021-09-26 [1] CRAN (R 4.1.0)
#>  R6            2.5.1      2021-08-19 [1] CRAN (R 4.1.0)
#>  rappdirs      0.3.3      2021-01-31 [1] CRAN (R 4.1.0)
#>  reprex        2.0.2      2022-08-17 [1] CRAN (R 4.1.2)
#>  rlang         1.1.1      2023-04-28 [1] CRAN (R 4.1.2)
#>  rmarkdown     2.18       2022-11-09 [1] CRAN (R 4.1.2)
#>  rprojroot     2.0.2      2020-11-15 [1] CRAN (R 4.1.0)
#>  rstudioapi    0.14       2022-08-22 [1] CRAN (R 4.1.2)
#>  sessioninfo   1.2.2      2021-12-06 [1] CRAN (R 4.1.0)
#>  stringi       1.7.6      2021-11-29 [1] CRAN (R 4.1.0)
#>  stringr       1.5.0      2022-12-02 [1] CRAN (R 4.1.2)
#>  styler        1.7.0      2022-03-13 [1] CRAN (R 4.1.2)
#>  tibble        3.2.1      2023-03-20 [1] CRAN (R 4.1.2)
#>  utf8          1.2.2      2021-07-24 [1] CRAN (R 4.1.0)
#>  vctrs         0.6.3      2023-06-14 [1] CRAN (R 4.1.2)
#>  withr       * 2.5.0      2022-03-03 [1] CRAN (R 4.1.2)
#>  xfun          0.40       2023-08-09 [1] CRAN (R 4.1.2)
#>  yaml          2.2.1      2020-02-01 [1] CRAN (R 4.1.0)
#>  zip           2.3.0      2023-04-17 [1] CRAN (R 4.1.2)
#> 
#>  [1] /Library/Frameworks/R.framework/Versions/4.1/Resources/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────

jameslairdsmith and others added 5 commits October 15, 2023 19:41
As it stands, code for unpacking of git repo packfiles is sensitive to the order of the trees. This doesn't matter for servers that provide it in the order of deepest roots first, but for those that don't do that, unpacking will provide incorrect results. This problem is the case for repos hosted on Azure DevOps, for example.

This change uses the frequency of the hashes throught the packfile to sort the trees from deepest (the root tree) to least deep. This is the most straightforward way I could think of for achieving this.

Practically, the function for unpacking the packfile (`unpack_packfile_repo()`) now includes a call to a new function `sort_trees()`.
Start from the root tree, which might not be
the first one.

Closes r-lib#339.
@gaborcsardi
Copy link
Member

Thank you, this helped me a lot in fixing the issue! I think your solution was correct, but also a bit more complicated than needed. process_tree() already works recursively, which means that the order was correct, as long as you started at the correct tree, the one that belonged to the root directory of the repo. So we just needed to start there.

I also added some tests for this. Thank you again!

I will comment here later today, when the nightly build of pak is updated to include this fix.

@gaborcsardi gaborcsardi merged commit 25abf6d into r-lib:main Oct 23, 2023
11 checks passed
@gaborcsardi
Copy link
Member

OK, this should be in the nightly devel build of pak now. The nightly build is not very smooth nowadays, so don't hesitate to let me know if it still does not work for you. Thanks again for the PR!

@jameslairdsmith
Copy link
Contributor Author

Thanks Gábor! I really appreciate how quickly you were able to give it a look!

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Jan 25, 2024
# pak 0.7.1

* pak can now handle the case when `Config/Needs/*` dependencies
  are requested for package from a repository.

* pak uses safer `*printf()` format strings now.

# pak 0.7.0

* pak now correctly handles the latest GitHub release with
  the `@*release` notation (@pawelru,
  r-lib/pkgdepends#321)

* pak now correctly handles having multiple instances of the same
  package in the metadata, with different R version requirements
  (#534, #538, r-lib/pkgdepends#331).

* `git::` package references work better now for Azure DevOps
  (@jameslairdsmith, r-lib/pkgdepends#333,
  r-lib/pkgdepends#342).

* pak now does a better job at accepting installed packages, and
  avoids reinstalling more packages than needed when using a lock file
  (r-lib/actions#759,
  r-lib/pkgdepends#338).

# pak 0.6.0

* pak now requires R >= 3.5.0.

* Many improvements in system requirements support:
  - New functions:
    - `pkg_sysreqs()`: calculate system requirements of packages.
    - `sysreqs_db_list()`, `sysreqs_db_match()`, `sysreqs_db_update()`:
      query the system requirements database.
    - `sysreqs_list_system_packages()`, `sysreqs_check_installed()`,
      `sysreqs_fix_installed()`: query and install missing system packages.
    - `sysreqs_platforms()`: list supported platforms.
  - The installation proposal, printed before installation, now includes
    required and missing system packages, on supported platforms.
  - New `sysreqs_platform` configuration option to override the auto-detected
    platform.
  - Faster, asynchronous system requirements lookup.
  - pak now does not reinstall system requirements by default,
    if they are already installed. (You can force a reinstall/upgrade
    with the `sysreqs_update` configuration option.)

* New `gitlab::` package source to install packages from GitLab
  (r-lib/pkgdepends#315).

* pak now correctly parses multiple `git::` packages at once
  (r-lib/pkgdepends#318).

* `git::` package sources now support version 1 of the git protocol.
  E.g. the Bioconductor git repositories now work:
  `git::https://git.bioconductor.org/packages/limma`
  (r-lib/pkgdepends#314).

* The `platforms` config parameter now works correctly with `deps::`
  package sources (#522).

* New `include_linkingto` config parameter to always include `LinkingTo`
  packages in the solution, even for binaries
  (https://github.com/r-lib/pkgdepends/issues/485).

* `pkg_name_check()` now does not include Acromine results, because the web
  site was unstable.

* In `repo_add()` and `repo_resolve()` the `MRAN@` prefix is now deprecated
  and resolves to PPM, because MRAN will be retired soon. See more at
  <https://posit.co/blog/migrating-from-mran-to-posit-package-manager/>.

* The metadata cache now has `SystemRequirements` information for Bioconductor
  packages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants