Closed tonyk7440 closed 4 years ago
@tonyk7440 being a daily user of XML , I faced the same issue. From what I see now on XML CRAN page, XML is now maintained by CRAN team. Related to this, I contacted them (no answer yet) regarding:
If you are running a R < 4.0, and you want to install XML package, you should download/install it from latest archived package, with eg:
wget https://cran.r-project.org/src/contrib/Archive/XML/XML_3.99-0.3.tar.gz
R -e "install.packages('XML_3.99-0.3.tar.gz', repos = NULL, type = 'source')"
I find the decision to update the force the main available source of XML to depend on the bleeding edge version of R, with absolutely no mention or documentation of this huge breaking change (let alone semver update) totally confounding.
This change appears to have taken place between 3.99-0.3
& 3.99-0.5
( a dev semver extension ), & pushed to CRAN without even documenting what's changed that necessiates this.
https://github.com/cran/XML/blob/7ab4aa451639a5b2fc73eb370b6d339d4f4c4979/DESCRIPTION#L1-L11
Grr :angry:
@eblondel , did you wind up hearing back from them?
Here's the actual diff between the versions:
https://github.com/cran/XML/compare/3.99-0.3...matthewstrasiotto:3.99-0.5
From the diff, there's not a strong indication what prompted the dependency-
Possibly R 4.0.0 deprecated the commandline switch --slave
, & that appears to be the most likely cause
@matthewstrasiotto I got a reply from CRAN that I summarize here: CRAN stated that the current XML package requires R >= 4.0.0 and that source code for earlier versions of XML is available to those who use other versions of R. No justification was given on the change, nor on the possibility to reduce this dependency. CRAN is now maintained on R-core's svn server and CRAN are literally only maintainers, with no possibility to contribute.
If you want to report issues to XML you should then report it by e-mail directly to the active maintainer (ie CRAN Team, as indicated in https://cran.r-project.org/package=XML).
I assume that the best to clarify this for users would be that the present github repository should be archived, with explanation that source code is maintained now on R-core's svn server.
I also see that the CRAN repository mirror on Github is not updated for this package: https://github.com/cran/XML (not sure why). Being an unofficial mirror, it might that it is not maintained anymore, but what is sure is that XML mirror is not up-to-date.
That's right, the CRAN mirror is out of date- I forked it & the applied the CRAN source to it to produce that diff.
I understand the change, actually. R 4.0.0
renamed the --slave
option to --no-echo
, with no smooth deprecation window. --no-echo
is a better name for the option (it literally supresses echoing of input, & doesn't have connotations of slavery).
I'm not sure why they didn't smoothly deprecate this, maybe removing the slavery allusion was urgent.
In any case, I've updated my fork for backwards compatibility.
I'll try emailing the maintainers, we'll see. I'll include a diff they can apply in the email.
0001-Change-R-minimum-version-back-to-2.13.0.patch.txt
well, here's the patch, for posterity. Someone else can also try to bug them to accept it
I'm afraid you will receive a negative answer from the maintainer. Since XML is maintained with R-core, they align their packages on new major R version. I don't have details if or not it is required within the specific scope of XML package, but as maintainer the CRAN team is here to guarantee XML works and follows evolution of R. That's why CRAN team is maintainer: to make sure XML can keep working in time, which is the case so far. If they changed this Depends, there should be a very good reason to do so. And as I said, no contribution is accepted (in principle), unless you a R core developer. You can raise the point again, but don't expect too much of your request. For systems/infras relying on R 3.6.x the best is to download package from CRAN archive or better use functions like devtools::install_version
that let you specify the version, what I do for now, while testing all my packages relying on XML to R 4.0 . Next each user/ infra should progressively upgrade and move to the current active R version.
I understand your point, and I do appreciate it. Personally, I'll probably upgrade to 4.x soon enough ( the raw strings are enough of a sell for me , I can't wait to not have to quadruple escape my regex meta chars ).
Afaik, the reason for the change was because their shell scripts changed from
R --slave
to R --no-echo
and nothing more.
My patch does nothing more than check the R version, and if its < 4, use --slave
.
If in some future iteration of R, the version string changes to a format my script can't parse, it should gracefully degrade to using the new API
there's no real downsides but i guess you're not the one to convince
Thanks folks, I'll close this as it seems we know what is going on now.
In summary, This repo is old, the XML package is now maintained by CRAN and this is not it and https://github.com/cran/XML is also not up to date with the CRAN version.
The CRAN version now depends on R 4.0+, the reason for this is mostly to align to the latest main release.
If you need to use XML with a version of R that is older than 4.0 then you can download with something like the following from @eblondel
wget https://cran.r-project.org/src/contrib/Archive/XML/XML_3.99-0.3.tar.gz
R -e "install.packages('XML_3.99-0.3.tar.gz', repos = NULL, type = 'source')"
And to @omegahat , you might want to archive this repo to avoid confusion from foolish people like me ;)
I understand the confusion but unfortunately it is not true that the omegahat version of the XML package is not up to date with the version on CRAN. The version here has enhanced functionality that CRAN doesn't. The CRAN maintainers made numerous small changes to the package for installation on different platforms. So now the two versions have diverged.
Trying to install this package but getting the error:
package ‘XML’ is not available (for R version 3.6.0)
This lead me to look at the DESCRIPTION file but that specifies a dependency on R >= 1.2.0 whereas the CRAN page says R 4.0.
I'm not sure if I'm confusing two different packages or what is happening?