feat: publication dates, index format version, and side file pinning - #15
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #14.
Publication dates. A version built from a commit hash carries no order of its own, so each resolved version now records when upstream published it.
Index format version. The index is published as
{format, packages}so a client can tell an index it cannot read from one that merely lacks a field.Side files can opt out of pinning.
[[extra]]takesverify, defaulting to true. A licence sets it false: licences are served from a branch rather than a tag, so a pinned hash would turn an upstream copyright-year edit into a failed download. Binaries shipped as side files stay verified.Two fixes found while testing that.
metafiltered side files down to those carrying a hash, which silently dropped every licence once they became unpinned.hashfillread version files into aBTreeMapand wrote the digest tables back alphabetically, whileresolvewrites[url]inhost.supportedorder. A file agreed with itself until hashfill touched it, then flipped to aarch64-first. Every table now follows the url order. This also needed thetomlcrate'spreserve_orderfeature, since it sorts keys during parsing otherwise.Resolve is usable without a token. It falls back to
gh auth tokenwhenGITHUB_TOKENis unset, detects an exhausted quota from the response headers rather than reporting a bare 403, and stops instead of repeating the same failure for every remaining package. It also reports new pins and progress, and matches a package by name as well as by directory.