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

cabal info drops the most recent version from "Versions available" #10551

Open
andreasabel opened this issue Nov 13, 2024 · 2 comments
Open

cabal info drops the most recent version from "Versions available" #10551

andreasabel opened this issue Nov 13, 2024 · 2 comments

Comments

@andreasabel
Copy link
Member

$ cabal info QuickCheck 
* QuickCheck       (library)
    ...
    Versions available: 1.1.0.0, 1.2.0.0, 1.2.0.1, 2.10.1, 2.12.4, 2.12.5,
                        2.14.1, 2.14.2, 2.14.3 (and 52 others)
    ...

The most recent version is 2.15.0.1, and I wonder why it didn't make it into the blessed selection of available versions displayed by cabal info.

@ffaf1
Copy link
Collaborator

ffaf1 commented Nov 13, 2024

-- | Reorder a bunch of versions to put the most interesting / significant
-- versions first. A preferred version range is taken into account.
--
-- This may be used in a user interface to select a small number of versions
-- to present to the user, e.g.
--
-- > let selectVersions = sort . take 5 . interestingVersions pref
interestingVersions :: (Version -> Bool) -> [Version] -> [Version]
interestingVersions pref =
map (mkVersion . fst)
. filter snd

This might be the place.

@andreasabel
Copy link
Member Author

QuickCheck 2.15 is deprecated, but 2.15.0.1 not. Maybe there is a bug in handling the preferred versions.

QuickCheck <2.11 || >2.11 && <2.11.1 || >2.11.1 && <2.11.2 || >2.11.2 && <2.12.6 || >2.12.6 && <2.13 || >2.13 && <2.15 || >2.15

Anyway, this interestingVersions code is the stuff we love too look at: Some ad-hoc algorithm, no documentation, no tests...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants