Have a way to update only packages that have binaries available.

Open
#324 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
tooling

Research direction

Reproduce the example using new_pkg_installation_proposal(), PKG_PLATFORMS, solve(), and show_solution() to understand the current platform-mismatch behavior. Trace the proposal and dependency-resolution entry points involved, then define completion as providing a way to update only packages with binaries available for the current platform.

Written by the indexing model from the issue text.

Description

feature

On 5471946.

Follow-up to https://github.com/r-lib/pak/issues/522.

library(pkgdepends)
dir.create(pkg <- tempfile())
dir.create(lib <- tempfile())
setwd(pkg)
Sys.setenv(PKG_PLATFORMS = current_r_platform())
writeLines("Package: foo\nVersion: 1.0.0\nImports: pillar\nRemotes: r-lib/pillar", "DESCRIPTION")
p <- new_pkg_installation_proposal("deps::.", config = list(library = lib))
p$solve()
#> ! Using bundled GitHub PAT. Please add your own PAT using `gitcreds::gitcreds_set()`.
#> ℹ Loading metadata database
#> ✔ Loading metadata database ... done
#> 
p$show_solution()
#> Error: ! Could not solve package dependencies:
#> * deps::.: Can't install dependency r-lib/pillar
#> * r-lib/pillar: Platform mismatch

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

Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.2.3 (2023-03-15)
#>  os       macOS Ventura 13.4.1
#>  system   aarch64, darwin20
#>  ui       X11
#>  language (EN)
#>  collate  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       Europe/Zurich
#>  date     2023-07-10
#>  pandoc   3.1.3 @ /opt/homebrew/bin/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version    date (UTC) lib source
#>  callr         3.7.3      2022-11-02 [1] CRAN (R 4.2.0)
#>  cli           3.6.1      2023-03-23 [1] CRAN (R 4.2.0)
#>  crayon        1.5.2      2022-09-29 [1] CRAN (R 4.2.0)
#>  curl          5.0.1      2023-06-07 [1] CRAN (R 4.2.0)
#>  debugme       1.1.0      2017-10-22 [1] CRAN (R 4.2.0)
#>  desc          1.4.2      2022-09-08 [1] CRAN (R 4.2.0)
#>  digest        0.6.33     2023-07-07 [1] CRAN (R 4.2.0)
#>  evaluate      0.21       2023-05-05 [1] CRAN (R 4.2.0)
#>  fansi         1.0.4      2023-01-22 [1] CRAN (R 4.2.0)
#>  fastmap       1.1.1      2023-02-24 [1] CRAN (R 4.2.0)
#>  filelock      1.0.2      2018-10-05 [1] CRAN (R 4.2.0)
#>  fs            1.6.2      2023-04-25 [1] CRAN (R 4.2.0)
#>  glue          1.6.2      2022-02-24 [1] CRAN (R 4.2.0)
#>  htmltools     0.5.5      2023-03-23 [1] CRAN (R 4.2.0)
#>  jsonlite      1.8.7      2023-06-29 [1] CRAN (R 4.2.0)
#>  knitr         1.43       2023-05-25 [1] CRAN (R 4.2.3)
#>  lifecycle     1.0.3      2022-10-07 [1] CRAN (R 4.2.0)
#>  lpSolve       5.6.18     2023-02-01 [1] CRAN (R 4.2.0)
#>  magrittr      2.0.3      2022-03-30 [1] CRAN (R 4.2.0)
#>  pillar        1.9.0      2023-03-22 [1] CRAN (R 4.2.0)
#>  pkgbuild      1.4.1      2023-06-14 [1] CRAN (R 4.2.3)
#>  pkgcache      2.1.1.9000 2023-07-10 [1] Github (r-lib/pkgcache@9612706)
#>  pkgdepends  * 0.5.0.9001 2023-07-10 [1] Github (r-lib/pkgdepends@5471946)
#>  prettyunits   1.1.1      2020-01-24 [1] CRAN (R 4.2.0)
#>  processx      3.8.2      2023-06-30 [1] CRAN (R 4.2.0)
#>  ps            1.7.5      2023-04-18 [1] CRAN (R 4.2.0)
#>  purrr         1.0.1      2023-01-10 [1] CRAN (R 4.2.0)
#>  R.cache       0.16.0     2022-07-21 [1] CRAN (R 4.2.0)
#>  R.methodsS3   1.8.2      2022-06-13 [1] CRAN (R 4.2.0)
#>  R.oo          1.25.0     2022-06-12 [1] CRAN (R 4.2.0)
#>  R.utils       2.12.2     2022-11-11 [1] CRAN (R 4.2.0)
#>  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)
#>  reprex        2.0.2      2022-08-17 [1] CRAN (R 4.2.0)
#>  rlang         1.1.1      2023-04-28 [1] CRAN (R 4.2.0)
#>  rmarkdown     2.23       2023-07-01 [1] CRAN (R 4.2.0)
#>  rprojroot     2.0.3      2022-04-02 [1] CRAN (R 4.2.0)
#>  rstudioapi    0.14       2022-08-22 [1] CRAN (R 4.2.0)
#>  sessioninfo   1.2.2      2021-12-06 [1] CRAN (R 4.2.0)
#>  styler        1.10.1     2023-06-05 [1] CRAN (R 4.2.0)
#>  utf8          1.2.3      2023-01-31 [1] CRAN (R 4.2.0)
#>  vctrs         0.6.3      2023-06-14 [1] CRAN (R 4.2.3)
#>  withr         2.5.0      2022-03-03 [1] CRAN (R 4.2.0)
#>  xfun          0.39       2023-04-20 [1] CRAN (R 4.2.0)
#>  yaml          2.3.7      2023-01-23 [1] CRAN (R 4.2.0)
#>  zip           2.3.0      2023-04-17 [1] CRAN (R 4.2.0)
#> 
#>  [1] /Users/kirill/Library/R/arm64/4.2/library
#>  [2] /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────
Dominant language
C
Stars
135
Forks
47
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from r-lib/pkgdepends

All issues in r-lib/pkgdepends

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.