Skip to content

Remove PreferredVersions functionality#1498

Merged
ysangkok merged 7 commits intohaskell:masterfrom
tweag:no-prefversions
Apr 28, 2026
Merged

Remove PreferredVersions functionality#1498
ysangkok merged 7 commits intohaskell:masterfrom
tweag:no-prefversions

Conversation

@isovector
Copy link
Copy Markdown
Contributor

This PR removes the "preferred versions" part of the PreferredVersions feature.
My motivation for cleaning this up is to minimize the work required to accomplish #1486.

Closes #1345
Fixes #1374

After this PR, all of hackage should behave as if there were never any preferred versions.

I've replaced the cached sumRange with an on-demand function in order to invalidate the cache. I haven't benchmarked this, but could do something less stupid here if you think it's important.


data VersionStatus = NormalVersion | DeprecatedVersion | UnpreferredVersion deriving (Show, Eq, Ord, Enum)

$(deriveSafeCopy 0 'base ''VersionStatus)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instance removed to prove that we aren't serializing this thing anywhere

then Nothing
else Just range

data VersionStatus = NormalVersion | DeprecatedVersion | UnpreferredVersion deriving (Show, Eq, Ord, Enum)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a bad merge in #1492; the type got copied into .Types but never ended up being used.

@ysangkok ysangkok merged commit 0fe76b0 into haskell:master Apr 28, 2026
13 checks passed
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.

Distinguish between deprecated and non-preferred versions in the package index Consider removing the preferred versions feature

2 participants