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

pkgr fails to reject an impossible pkgr plan command that involves Recommended packages #333

Open
Dreznel opened this issue Jan 9, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Dreznel
Copy link
Contributor

Dreznel commented Jan 9, 2021

I'm using R 4.0.2 on MacOS.

Here was the original pkgr.yml and the corresponding output:

johncarlos: ~/go/src/github.com/metrumresearchgroup/pkgr/integration_tests/recommended$: cat pkgr.yml
Version: 1
# top level packages
Packages:
  - survivalrec
# any repositories, order matters
Repos:
  - miniCRAN: "../minicran"
  - MPN: "https://mpn.metworx.com/snapshots/stable/2020-02-18"
Library: "test-library"
Customizations:
    Repos:
      - miniCRAN:
            Type: source
            

johncarlos: ~/go/src/github.com/metrumresearchgroup/pkgr/integration_tests/recommended$: pkgr plan --loglevel=debug
INFO[0000] Installation would launch 12 workers         
INFO[0000] R Version 4.0.2                              
INFO[0000] OS Platform x86_64-apple-darwin17.0          
INFO[0000] found installed packages                      count=0
INFO[0000] Default package installation type:  binary   
INFO[0000] 0:11 (binary:source) packages available in for miniCRAN from ../minicran 
INFO[0000] 0:833 (binary:source) packages available in for MPN from https://mpn.metworx.com/snapshots/stable/2020-02-18 
INFO[0000] Package installation cache directory:  /Users/johncarlos/Library/Caches/pkgr 
INFO[0000] Database cache directory:  /Users/johncarlos/Library/Caches/pkgr/r_packagedb_caches 
DEBU[0000] package repository set                        pkg=survivalrec relationship="user package" repo=miniCRAN type=source version=0.0.1
INFO[0000] package installation status                   installed=0 not_from_pkgr=0 outdated=0 total_packages_required=1
INFO[0000] package installation sources                  miniCRAN=1 tarballs=0
INFO[0000] package installation plan                     to_install=1 to_update=0
INFO[0000] Library path to install packages: test-library 
INFO[0000] resolution time 10.092789ms    

Notes:

  • survivalrec imports survival as a dependency
  • The MPN Snapshot used predates the release of R4.0 and therefore does not have Mac binaries. Since we do not have a customization setting that repo to Type: source, this configuration effectively ignores MPN.
  • miniCRAN does not have survival available.
  • Since the NoRecommended option isn't set, it should default to FALSE, and therefore pkgr should be treating Recommended packages the same as regular packages.

Based on the notes above, it should be impossible for pkgr to fully construct a dependency tree, since it cannot find survival. Therefore, I believe it should be rejecting this plan.

Adding a customization to set MPN to Type: source seems to get the behavior to work as intended.

@Dreznel Dreznel added maybe-bug Something may break in non-standard situation bug Something isn't working and removed maybe-bug Something may break in non-standard situation labels Jan 9, 2021
Dreznel added a commit that referenced this issue Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant