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

setup-r-dependencies reinstalling too many packages? #759

Closed
gaborcsardi opened this issue Sep 20, 2023 · 6 comments · Fixed by r-lib/pkgdepends#338
Closed

setup-r-dependencies reinstalling too many packages? #759

gaborcsardi opened this issue Sep 20, 2023 · 6 comments · Fixed by r-lib/pkgdepends#338
Labels
bug an unexpected problem or unintended behavior

Comments

@gaborcsardi
Copy link
Member

E.g. https://github.com/cynkra/dm/actions/runs/6242346392/job/16946128599

Reinstalls 76 packages out of about 152.

@gaborcsardi gaborcsardi added the bug an unexpected problem or unintended behavior label Sep 20, 2023
@gaborcsardi
Copy link
Member Author

cc @krlmlr

@krlmlr
Copy link
Member

krlmlr commented Sep 20, 2023

Same behavior with the second run on a clean cache: https://github.com/cynkra/dm/actions/runs/6252912237/job/16981709927 . .

@gaborcsardi
Copy link
Member Author

I can reproduce locally, so will fix very soon.

@gaborcsardi
Copy link
Member Author

gaborcsardi commented Sep 21, 2023

Yeah, so this is because the installed package has a slightly different platform string than the one in the lockfile:

Browse[2]> installed[["platform"]]
[1] "x86_64-pc-linux-gnu"
Browse[2]> solution[["platform"]]
[1] "x86_64-pc-linux-gnu-ubuntu-22.04"

OTOH, we could also use this:

Browse[2]> installed$remotepkgplatform
[1] "x86_64-pc-linux-gnu-ubuntu-22.04"

But for a package installed from CRAN we only have this, and we should handle this as well:

Repository: CRAN
Date/Publication: 2022-01-31 13:39:41 UTC
Built: R 4.3.1; x86_64-pc-linux-gnu; 2023-09-21 14:53:54 UTC; unix
RemoteType: standard
RemotePkgRef: tiff
RemoteRef: tiff
RemoteRepos: https://cloud.r-project.org
RemotePkgPlatform: source
RemoteSha: 0.1-11

Or, a package installed from CRAN with install.packages() has this:

Repository: CRAN
Date/Publication: 2022-01-31 13:39:41 UTC
Built: R 4.3.1; x86_64-pc-linux-gnu; 2023-09-21 14:56:06 UTC; unix

and of course packages installed from PPM will have this with:

Repository: RSPM

gaborcsardi added a commit to r-lib/pkgdepends that referenced this issue Sep 21, 2023
For standard, cran and bioc packages.

Closes r-lib/actions#759
@gaborcsardi
Copy link
Member Author

gaborcsardi commented Sep 22, 2023

Should be in tomorrow's pak devel build, in about 7-8 hours.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants