goldingn / versions

Query and Install Specific Versions of Packages on CRAN
Other
24 stars 7 forks source link

Microsoft R Application Network retirement #34

Open bathyscapher opened 1 year ago

bathyscapher commented 1 year ago

Apparently, MRAN will be offline in June 2023. Is the consequence that versions is going to retire as well? Or are there plans to use another server that provides a CRAN archive?

brianrepko commented 1 year ago

I just did a quick review and see that the 0.4 version is not on CRAN but that it does contain the ability to update the MRAN url as the 'versions.mran' option. I installed from github and set the option to the Public Posit Package Manager URL - similar to how checkpoint works - see https://posit.co/blog/migrating-from-mran-to-posit-package-manager/ for details. However, that does not work for versions. Versions assumes a CRAN set of URLs under the snapshot date URL and not just a CRAN-like repository.

That said, one could update versions to parse the JSON that comes back from the Public Posit Package Manager API and get all the versions, publication dates, URL for installation, and the ability to tell if latest is on CRAN or not. I've checked the JSON for this and it seems do-able. We'd still need an option in case you want to point it to a different Posit Package Manager. I'd also add that there is a need for this since {checkpoint} doesn't have it and neither does {ppmtools} at this point.

I've forked this repo but have not decided if I'll take this on - updating it from MRAN to PPM. We would need to add a dependency on {jsonlite} in which case it might be easier to add these functions to {ppmtools}.

brianrepko commented 1 year ago

@goldingn any thoughts on this?

GabryS3 commented 4 months ago

im really confused about this post. IS versions allowing to use CRAN instead of MRAN?? when i try to indicate as repos=cran website, it still gives me the same error that cannot connect to mran...

<versions::install.versions("dartR", version="2.7.2", repos ="http://cran.us.r-project.org/", lib="C:/Users/Jessica Morgan/AppData/Local/R/win-library/4.3/4.3_dartR_2.7.2")

Error in download.file(url, file, quiet = TRUE) : cannot open URL 'https://mran.revolutionanalytics.com/snapshot'

Any fixes?? Thanks a lot! Gabry

brianrepko commented 4 months ago

@GabryS3 there was an unreleased version that would allow you to change the URL. The thought was that one could change it from MRAN to Posit Public Package Manager. However versions assumes more structure than PPPM supports for snapshot versions. So that didn't work - versions is very much tied to MRAN structure. I'd suggest remotes::install_version for what you are trying to do. I hope that helps.