-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
R: Using official cloud URL for CRAN #2956
Conversation
cran.r-project.org runs on a single old-school server in Austria and could potentially be overloaded if "everyone" used it. cloud.r-project.org is a cloud-based repository that "automatic redirection to servers worldwide [...]", cf. https://cran.r-project.org/mirrors.html. I assume, that cloud.* can be scale up as needed. Out of the official CRAN mirror, this should be the safest one to pick if a static CRAN mirror is needed.
@adamjstewart, I assume you're the author of most of the $ grep -h -F " url " -r --include="package.py" r-* | sed 's|/src/.*||g' | sort -u
url = "https://cran.r-project.org
url = "https://cran.rstudio.com right now. I'd like to suggest that you point these to |
@HenrikBengtsson Haha, I've actually never written an R package before #2952. The reason I show up as the author of all of them is because I wrote an RPackage base class and converted all of the existing packages to remove duplicated code in #2761. @glennpj and @JavierCVilla have actually written most of our R packages. From what I can tell, it looks like the URLs are identical aside from the hostname, so what you propose would be an easy switch. Want to do it for every package? |
I see - I guess I picked the wrong R package to find authorship. Yes, I would update all those CRAN domains to point to cloud.r-project.org. It would also be less confusing to users and others cut'n'pasting from existing ones. |
I would probably wait until #2952 is merged and then convert them all at once. I can do it if you want, or you can submit a PR/add to this one. |
Also, I'm not sure if you have any sway with the R maintainers, but there repository system is a nightmare. I like the uniformity, but Spack generally assumes that all versions of a package will be found in a single directory, and there won't be any other software in that directory. Since R hosts the latest version of every package in one directory, and older versions in a different directory, we need a
If the R maintainers simply added the latest version to the archive directory, we would only need to look in a single directory and there wouldn't be any competing packages to ignore. |
@adamjstewart: activation should get fixed but I was planning on replacing it with a notion of "environments", kind of like Conda has, where you could have not only Python extensions but any other package activated in the same environment. Ideally that would become a common thing for users to do (like lightweight containers or virtualenv). |
@adamjstewart: can you deduce the list_url from the URL? We could make list_url a property (or something like it) in RPackage. |
@tgamblin For CRAN, every package looks like: homepage = "https://cran.r-project.org/package={name}"
url = "https://cloud.r-project.org/src/contrib/{name}_{version}.tar.gz"
list_url = "https://cloud.r-project.org/src/contrib/Archive/{name}" So technically we could put all of these in RPackage. The only problem is that |
@adamjstewart: cool. if we can do class properties as described here I think you could have the derived package define cran_name and define the other three defined in terms of it in RPackage. |
@adamjstewart, trying to get CRAN, which is run by a small group of volunteers with a large load, to change to directory structure for us is probably not worth it. Instead of scraping the CRAN servers, I think the METACRAN API (mentioned in #2951 (comment)) could be a must faster alternative. It should contain all the information you need. PS. For clarification, and you'll hear once in a while in the R forums: CRAN (Comprehensive R Archive Network) != R. This means that CRAN is the de facto standard online repository (and gatekeeper / FOSS protector, licenses, ...) for contributed R packages. The R core team developers and maintains R and distribute it via CRAN. They try to keep these two separated, but there are a few hard coded ties between the two, e.g. the R code knows about CRAN. It's good to know about this if you reach out on the R forums and ask for help or wanna discuss, say, CRAN. |
@tgamblin I think I want to wait until you get a chance to rework FetchStrategies before I work on |
cran.r-project.org runs on a single old-school server in Austria and could potentially be overloaded if "everyone" used it. cloud.r-project.org is a cloud-based repository that "automatic redirection to servers worldwide [...]", cf. https://cran.r-project.org/mirrors.html. I assume, that cloud.* can be scale up as needed. Out of the official CRAN mirror, this should be the safest one to pick if a static CRAN mirror is needed.
cran.r-project.org runs on a single old-school server in Austria and could potentially be overloaded if "everyone" used it. cloud.r-project.org is a cloud-based repository that "automatic redirection to servers worldwide [...]", cf. https://cran.r-project.org/mirrors.html. I assume, that cloud.* can be scale up as needed. Out of the official CRAN mirror, this should be the safest one to pick if a static CRAN mirror is needed.
cran.r-project.org runs on a single old-school server in Austria and could potentially be overloaded if "everyone" used it. cloud.r-project.org is a cloud-based repository that "automatic redirection to servers worldwide [...]", cf. https://cran.r-project.org/mirrors.html. I assume, that cloud.* can be scale up as needed. Out of the official CRAN mirror, this should be the safest one to pick if a static CRAN mirror is needed.
cran.r-project.org runs on a single old-school server in Austria
and could potentially be overloaded if "everyone" used it.
cloud.r-project.org is a cloud-based repository that "automatic redirection to servers worldwide [...]", cf. https://cran.r-project.org/mirrors.html.
I assume, that cloud.* can be scale up as needed. Out of the official CRAN mirror, this should be the safest one to pick if a static CRAN mirror is needed.