Consider removing the preferred versions feature
@phadej and @gbaz suggested removing preferred versions in #1345, so I'm opening a new issue to discuss whether the feature is still needed. Is there a use case for preferring a version that is not the latest, when the latest version shouldn't simply be deprecated?
cc @ffaf1 @Mikolaj
Popular packages which have a “preferred version” on Hackage: amazonka, hxt, hspec, webdriver.
So let me ping @sol, @brendanhay, @UweSchmidt, @erratic-pattern and ask this question:
Is there a cogent reason why you used “preferred version” in the past? Would your package maintainership be hindered if Hackage were to remove (for the future) such possibility?
The reason is lost to time, so no, it would not be hindered for amazonka.
I think I used this a long time ago to kind of soft deprecate versions < 2.
As long as cabal gives strong preference to the latest version then I think I'm good.
I just found a mailing list thread linked to from https://github.com/haskell/cabal/issues/401 that mentions two other reasons: https://groups.google.com/g/fa.haskell/c/w53KJZqUie8/m/vtNcO54iorEJ
Actually it does that for specific packages, there's a file in the
hackage index called 'referred-versions':
base < 4
parsec < 3
HaXml == 1.13.*
QuickCheck < 2
These are all cases where there are large numbers of packages that fail
to specify an upper version constraint but break when built with the
later version of the package. In the case of HaXml it is also because
the 1.13 series is the one considered stable by its author.
I think that the use case of protecting packages without upper bounds is probably made obsolete by Hackage metadata revisions.
No problem with removing that feature.
Uwe
On Fri, Mar 28, 2025 at 7:34 AM ffaf1 @.***> wrote:
Popular packages which have a “preferred version” on Hackage: amazonka, hxt, hspec, webdriver.
So let me ping @sol https://github.com/sol, @brendanhay https://github.com/brendanhay, @UweSchmidt https://github.com/UweSchmidt, @erratic-pattern https://github.com/erratic-pattern and ask this question:
Is there a cogent reason why you used “preferred version” in the past? Would your package maintainership be hindered if Hackage were to remove (for the future) such possibility?
— Reply to this email directly, view it on GitHub https://github.com/haskell/hackage-server/issues/1374#issuecomment-2760356468, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADF5FZIOQNG4EBDMN7UHUL2WTNNRAVCNFSM6AAAAABZ6OBJIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONRQGM2TMNBWHA . You are receiving this because you were mentioned.Message ID: @.***> [image: ffaf1]ffaf1 left a comment (haskell/hackage-server#1374) https://github.com/haskell/hackage-server/issues/1374#issuecomment-2760356468
Popular packages which have a “preferred version” on Hackage: amazonka, hxt, hspec, webdriver.
So let me ping @sol https://github.com/sol, @brendanhay https://github.com/brendanhay, @UweSchmidt https://github.com/UweSchmidt, @erratic-pattern https://github.com/erratic-pattern and ask this question:
Is there a cogent reason why you used “preferred version” in the past? Would your package maintainership be hindered if Hackage were to remove (for the future) such possibility?
— Reply to this email directly, view it on GitHub https://github.com/haskell/hackage-server/issues/1374#issuecomment-2760356468, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADF5FZIOQNG4EBDMN7UHUL2WTNNRAVCNFSM6AAAAABZ6OBJIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONRQGM2TMNBWHA . You are receiving this because you were mentioned.Message ID: @.***>
-- Uwe Schmidt Rissener Landstr. 256B 22559 Hamburg