Public RSPM presents outdated version of XML package

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.

An example of the installation failure can be found in this Github workflow log

This was then fixed with the following update to explicitly require a newer version of XML (Update XML version requirement · grimbough/biomaRt@bbb10bb · GitHub)

The subsequent log showing the 3.99-0.8 version being used and a successful installation can be seen in this Github action log

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.

1 Like

Great, thanks for taking the time to look at it. Happy to provide more details or test things if that's helpful.

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?

Hi @greg,

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.

  • I'm also seeing the exact same problem when testing one of my packages as @greg in Github Actions with the {XML} package (a dependency of a dependency).

  • 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":

    E: Unable to locate package gdebi-core
    

    Note gdebi-core might not be available in Ubuntu 22.04 which perhaps now is "Ubuntu-latest"?