haskell / haskell/cabal

Favour non-preferred versions over deprecated versions

Open
#10,097 1 comment 2 reactions 0 assignees View on GitHub
cabal-install: solver meta: tracking re: deprecated packages and versions type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

As of now, deprecated versions and non-preferred versions are treated equally: Cabal will find the **preferred** versions, try all of them, and if none is acceptable, then try the non-preferred and deprecated versions, with no difference among them.

My understanding is that
- non-preferred versions are perfectly functioning versions that are just less preferable than preferred versions
- deprecated versions are malfunctioning versions that should be avoided

So my proposed flow would be the following:
- when requested for package `foo`
- if there are preferred versions, try those in decreasing order of version number
- if none of those are acceptable, try the non-preferred and non-deprecated versions in decreasing order of version. If one is acceptable, pick it with a warning.
- if none of those are acceptable, try the deprecated versions in decreasing order of version. If one is acceptable, pick it with a warning/or don't even pick it unless some flag `--allow-deprecated=[all|foo|...]` is provided.

There are a bunch of issues on this matter, just mentioning deprecated and normal versions, but the non-preferred versions just complicate it even more:
- https://github.com/haskell/cabal/issues/1518
- https://github.com/haskell/cabal/issues/9522
- https://github.com/haskell/cabal/issues/9830
- https://github.com/haskell/cabal/issues/8863

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.