There appears to be two versions of the XML package available via the RStudio Package Manager. Both versions 3.99-0.3 and 3.99-0.8 appear when I search for "XML" i.e. RStudio Package Manager
When installing with install.packages() or via the pak package it defaults to using the older 3.99-0.3 version. Unfortunately this old version is no longer compatible with R-4.2 and fails to build from source on Ubuntu. Forcing installation of the newer version works, but it doesn't feel like expected behaviour to get an older copy of the package by default.
Hi there, thanks for all the helpful details here. I am not sure why this is happening, and I've entered a bug for the team on this. I'll let you know what we find out.
Hi @grimbough, there are indeed two different versions of the XML package in RSPM (and also CRAN), but RSPM doesn't distinguish between them well on the packages page. We'll look into UI improvements to make that less confusing.
The difference is that the older XML package is under an /src/contrib/Older/ path, while the newer XML is under the default /src/contrib/ path. For example, on CRAN, you can find them at:
When you install a package from a repository with two different versions of that package, the higher version should win, so we're not sure why 3.99-0.3 was being installed over 3.99-0.8.
Are you still able to reproduce this now, outside of the GitHub Actions workflow, just running install.packages() or pak::pkg_install() in an R 4.2 session? And are you able to reproduce this with a different CRAN mirror like https://cran.r-project.org?
Thanks for getting back to me with the explanation. I hadn't appreciated that CRAN itself had two copies of XML.
I'm unable to recreate this issue outside of the Github action. On my local machine I get 3.99-0.9 when using both install.packages() and pak::pkg_install() and the RStudio Package manager CRAN mirror.
However, if I re-run that workflow instance {pak} still tries to install the older version, however I'm not sure how much is cached when hitting "re-run". Perhaps it's something specific in the r-lib/actions/setup-r-dependencies action.
It does not replicated in a local R 4.2 session when using either install.packages() or pak::pkg_install().
I tried to duplicate by locally running the entire Github Actions workflow using the act tool (nektos/act on Github) but received the following error within "R-CMD-check/ubuntu-latest":