Install pak from the stable repo so Windows gets a Windows binary - #43
Open
VincentGuyader wants to merge 2 commits into
Open
Install pak from the stable repo so Windows gets a Windows binary#43VincentGuyader wants to merge 2 commits into
VincentGuyader wants to merge 2 commits into
Conversation
Until now the workflow installed pak from https://r-lib.github.io/p/pak/dev/ On the windows-latest (release) runner with R 4.6, that URL serves the Linux x86_64 tarball: trying URL '.../stable/linux/x86_64/pak_0.9.4_R-4-6_x86_64-linux.tar.gz' installation of package 'pak' had non-zero exit status so install.packages() fails and the next step errors with "there is no package called 'pak'". Switch to the stable repo, parameterised by .Platform$pkgType and R.Version()$os/$arch, so each runner pulls a binary it can actually install. This is the form documented at https://pak.r-lib.org/ and used in current r-lib/actions templates.
R 3.6 is from 2019 and several transitive dependencies no longer ship binaries for it on CRAN, so pak::pkg_deps() can't resolve a working solution. The job has no path back to green without pinning the entire dep tree to ancient versions, which is not worth the cost.
Member
Author
|
Suite à la review : ajout d'un commit qui retire |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexte
`R-CMD-check` était rouge sur `windows-latest (release)` :
```
trying URL 'https://r-lib.github.io/p/pak/dev/src/contrib/../../../stable/linux/x86_64/pak_0.9.4_R-4-6_x86_64-linux.tar.gz'
...
installation of package 'pak' had non-zero exit status
##[error]Error in loadNamespace(x) : there is no package called 'pak'
```
Cause
L'install de pak utilisait `https://r-lib.github.io/p/pak/dev/\`. Sur le runner Windows R 4.6, cette URL retourne un tarball Linux x86_64 au lieu d'un binaire Windows. `install.packages()` télécharge donc un .tar.gz Linux, échoue à l'installer côté Windows, et l'étape suivante `pak::pkg_deps(...)` ne trouve plus le namespace `pak`.
Fix
Utiliser le repo stable, paramétré par `.Platform$pkgType`, `R.Version()$os` et `R.Version()$arch`, qui sert le bon binaire selon le runner. C'est la recette officielle documentée sur https://pak.r-lib.org/ et utilisée par les templates r-lib/actions courants.
```r
install.packages("pak", repos = sprintf(
"https://r-lib.github.io/p/pak/stable/%s/%s/%s\",
.Platform$pkgType, R.Version()$os, R.Version()$arch
))
```
Pas fixé : windows-latest (R 3.6)
Cause différente sur ce job — pak s'installe correctement (binaire mingw32 dispo) puis `pak::pkg_deps("local::.")` échoue à résoudre l'arbre :
```
Error in pak subprocess
Caused by error: Could not solve package dependencies
```
R 3.6 date de 2019 ; plusieurs deps transitives n'ont plus de binaires R 3.6 sur CRAN. Pas un bug de la CI, c'est une limite externe : pas de fix possible sans changer la matrice. Comme demandé, je ne supprime pas le check.