Skip to content
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

Version manifest #9

Merged
merged 8 commits into from
Mar 5, 2024
Merged

Version manifest #9

merged 8 commits into from
Mar 5, 2024

Conversation

wlandau
Copy link
Member

@wlandau wlandau commented Mar 5, 2024

This PR adds record_versions() which creates and updates a record (versions.json) of package versions and the highest version recorded so far. It also keeps track of the MD5 hashes, which I assume are guaranteed to update whenever the package source changes (currently looking for confirmation on that). record_versions() also writes version_issues.json which is a subset of the manifest containing packages for which either:

  1. The current package release does not have the highest version number ever released for the package.
  2. The package is at its highest version number, but that same version was previously released under a different MD5.

Supports r-multiverse/help#21.

@wlandau wlandau requested a review from shikokuchuo March 5, 2024 11:11
@wlandau wlandau self-assigned this Mar 5, 2024
@wlandau
Copy link
Member Author

wlandau commented Mar 5, 2024

version_issues.json is written as its own file in order to help with r-multiverse/help#6 (cc @llrs). Only a small number of packages should have version issues, so a new releases::check_releases() function (or whatever we decide to call it) should be able to download the entirety of version_issues.json quickly. No need to support a whole web API just to scrape parts of the full versions.json.

@wlandau
Copy link
Member Author

wlandau commented Mar 5, 2024

r-multiverse/help#21 (comment) is really helpful. If those MD5s are brittle, then I agree we shouldn't use them here. Trouble is I don't know how to get the GitHub SHAs from the R-universe API. @shikokuchuo, do you know how?

@wlandau
Copy link
Member Author

wlandau commented Mar 5, 2024

Okay, so I added a check_hash argument just now. check_hash = FALSE allows us to do everything we can using the versions alone. This should unblock r-multiverse/help#6 from initial development while we think of something better for hashes..

R/record_versions.R Show resolved Hide resolved
R/record_versions.R Outdated Show resolved Hide resolved
R/record_versions.R Outdated Show resolved Hide resolved
R/record_versions.R Outdated Show resolved Hide resolved
@wlandau wlandau merged commit 3cad892 into main Mar 5, 2024
12 checks passed
@wlandau wlandau deleted the version-manifest branch March 5, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants