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

Not installing specific version available on CRAN #583

Open
fh-mthomson opened this issue Jan 16, 2024 · 4 comments
Open

Not installing specific version available on CRAN #583

fh-mthomson opened this issue Jan 16, 2024 · 4 comments

Comments

@fh-mthomson
Copy link

fh-mthomson commented Jan 16, 2024

Related to #582, but specific to {package}@{version} not installing as expected, even after running pak::meta_update():

Reprex:

options(repos = "https://packagemanager.posit.co/cran/__linux__/jammy/latest")

# baseline
pak::meta_update()
#> 
#> ✔ Updated metadata database: 3.16 MB in 2 files.
#> 
#> ℹ Updating metadata database
#> ✔ Updating metadata database ... done
#> 
packageVersion('paws')
#> [1] '0.5.0'

pak::pak("paws@0.4.0")
#> 
#> ✔ All system requirements are already installed.
#> 
#> ℹ No downloads are needed
#> ✔ 1 pkg + 28 deps: kept 29 [3.1s]
packageVersion('paws') # wrong
#> [1] '0.5.0'

devtools::install_version('paws', "0.4.0")
#> Downloading package from url: https://packagemanager.posit.co/cran/__linux__/jammy/latest/src/contrib/Archive/paws/paws_0.4.0.tar.gz
#> Installing package into '/home/michael.thomson/R/x86_64-pc-linux-gnu-library/4.1'
#> (as 'lib' is unspecified)
packageVersion('paws') # correct
#> [1] '0.4.0'

Created on 2024-01-16 with reprex v2.0.2

@emaigne
Copy link

emaigne commented Mar 13, 2024

You can try

> pak::pak("cran/paws@0.4.0")
                                                                            
✔ All system requirements are already installed.
  
ℹ No downloads are needed
✔ 1 pkg + 28 deps: kept 27 [2.2s]
> packageVersion('paws') 
[1] ‘0.4.0’

@fh-mthomson
Copy link
Author

Sure, but, I think that's a workaround, not the expectation, in that you should be able to install via {package}@{version} without specifying it's from CRAN?

@emaigne
Copy link

emaigne commented Mar 13, 2024

Agreed !

@fh-mthomson
Copy link
Author

Also replicated with a different package:

> pak::pak("withr@2.5.2")
                                                                           
  
ℹ No downloads are needed
✔ 1 pkg: kept 1 [3s]

Restarting R session...

> packageVersion('withr')
[1] ‘3.0.0’

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

No branches or pull requests

2 participants