Separate out Package utilities & enforce better typing discipline#1502
Open
isovector wants to merge 12 commits intohaskell:masterfrom
Open
Separate out Package utilities & enforce better typing discipline#1502isovector wants to merge 12 commits intohaskell:masterfrom
isovector wants to merge 12 commits intohaskell:masterfrom
Conversation
isovector
commented
May 4, 2026
isovector
commented
May 4, 2026
isovector
commented
May 4, 2026
isovector
commented
May 4, 2026
isovector
commented
May 4, 2026
isovector
commented
May 4, 2026
isovector
commented
May 4, 2026
gbaz
approved these changes
May 5, 2026
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.
This PR moves the
Utilitiessection out ofDistribution.Server.Packages.Typesand intoDistribution.Server.Packages.Utils. It then adds:These new datatypes used to be anonymous tuples, and their new existence gives an easy-to-target API for the work in #1486. This PR is careful to not use the new
MetadataRevisionconstructor anywhere, so that it can be trivially swapped out for a structure that can be pulled out of the database.In addition, we keep
OldUploadInfoaround, since swapping it inside of theacid-statewould be a breaking serialization change. Furthermore, all of the utility implementations are copied verbatim intoPackages.Utils.Acid, since they're still required for*.Statemaintenance, and will diverge more dramatically in upcoming PRs.This PR also changes the type of
pkgDesc:which makes it clear that it is a function of a specific revision, rather than of the package-as-a-whole. This in turn revealed some bugs in the feed code, which was using the wrong dates. I will send a separate PR fixing those issues.