pak icon indicating copy to clipboard operation
pak copied to clipboard

`MASS` requires `>= 4.3` (which seems _unlikely_)

Open jmbarbone opened this issue 2 years ago • 2 comments

Spotted at https://twitter.com/LisaDeBruine/status/1531692679192621056

pak (or something) seems to think that MASS requires a future version of R. install.packages("MASS") works fine. Still got the error after running pak::pak_update()

pak::pak("MASS")
#> ✔ Loading metadata database ... done
#> Error: Cannot install packages:                                            
#> * MASS: Needs R >= 4.3
#> Type .Last.error.trace to see where the error occurred

.Last.error.trace
#>
#> Stack trace:
#>
#> 12. (function (...)  ...
#> 13. base:::withCallingHandlers(cli_message = function(msg) { ...
#> 14. get("pkg_install_make_plan", asNamespace("pak"))(...)
#> 15. prop$stop_for_solution_error()
#> 16. private$plan$stop_for_solve_error()
#> 17. pkgdepends:::pkgplan_stop_for_solve_error(self, private)
#> 18. base:::stop("Cannot install packages:\n", msg, call. = FALSE)
#> 19. base:::.handleSimpleError(function (e)  ...
#> 20. h(simpleError(msg, call))
#> 21. base:::stop(e)
#> 22. (function (e)  ...
#>
#> x Cannot install packages:
#>* MASS: Needs R >= 4.3 

jmbarbone avatar Jun 01 '22 02:06 jmbarbone

My guess is that this is the same as https://github.com/r-lib/actions/issues/559

Here is a workaround:

❯ pak::pak("any::MASS?reinstall")

→ Will install 1 package.
→ The package (1.16 MB) is cached.
+ MASS   7.3-57
ℹ No downloads are needed, 1 pkg (1.16 MB) is cached
✔ Installed MASS 7.3-57  (25ms)
✔ 1 pkg: added 1 [210ms]

Another workaround:

❯ pak::pak("MASS", upgrade = FALSE)

→ Will update 1 package.
→ The package (1.16 MB) is cached.
+ MASS 7.3-56 → 7.3-57
? Do you want to continue (Y/n)
ℹ No downloads are needed, 1 pkg (1.16 MB) is cached
✔ Installed MASS 7.3-57  (26ms)
✔ 1 pkg: upd 1 [2.8s]

gaborcsardi avatar Jun 01 '22 05:06 gaborcsardi

Upgrading r-lib/actions to v2 fixed the issue for us.

https://twitter.com/_tanho/status/1531751396353114114?s=21&t=hCUlApLnNAKZQnz6uwVUJg

https://github.com/shanejorr/usincometaxes/pull/12#issuecomment-1154089527

tmm1 avatar Jun 13 '22 16:06 tmm1