r-lib / pak

A fresh approach to package installation
https://pak.r-lib.org
643 stars 56 forks source link

pak ignores the specified version #548

Open flying-sheep opened 8 months ago

flying-sheep commented 8 months ago

I try to install bioc::BiocFileCache@2.10.1

This results in the following lockfile entry. Note that it’s not the version I asked for. How is that possible?

       {
        "ref": "bioc::BiocFileCache@2.10.1",
        "package": "BiocFileCache",
        "version": "2.8.0",
        "type": "bioc",
        "direct": true,
        "binary": false,
        "dependencies": ["dbplyr", "dplyr", "RSQLite", "DBI", "filelock", "curl", "httr"],
        "vignettes": false,
        "needscompilation": false,
        "metadata": {
          "RemoteType": "bioc",
          "RemotePkgRef": "bioc::BiocFileCache@2.10.1",
          "RemoteRef": "bioc::BiocFileCache@2.10.1",
          "RemoteRepos": "https://bioconductor.org/packages/3.17/bioc",
          "RemotePkgPlatform": "source",
          "RemoteSha": "2.8.0"
        },
        "sources": ["https://bioconductor.org/packages/3.17/bioc/src/contrib/BiocFileCache_2.8.0.tar.gz"],
        "target": "src/contrib/BiocFileCache_2.8.0.tar.gz",
        "platform": "source",
        "rversion": "*",
        "directpkg": true,
        "license": "Artistic-2.0",
        "dep_types": ["Depends", "Imports", "LinkingTo", "Suggests", "Enhances"],
        "params": [],
        "install_args": "",
        "repotype": "bioc",
        "sysreqs_packages": {}
      },
gaborcsardi commented 8 months ago

Version specifications only work for CRAN packages.

flying-sheep commented 8 months ago

In this case it should just throw an error announcing that instead of silently failing to do the expected thing.

Also I haven’t seen how you select which Bioconductor release to use. Is that documented somewhere?

gaborcsardi commented 8 months ago

In this case it should just throw an error announcing that instead of silently failing to do the expected thing.

Agreed.

Also I haven’t seen how you select which Bioconductor release to use. Is that documented somewhere?

The matching version is selected. Override here: https://github.com/r-lib/pkgcache#package-environment-variables