haskell / haskell/cabal

Deprecate legacy --prefer-oldest CLI flag

Open
#12,217 1 comment 1 reaction 0 assignees View on GitHub
type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

https://github.com/haskell/cabal/pull/11569 adds a new ternary --prefer-version flag. This subsumes the functionality of the --prefer-oldest flag.

It would be good to eventually deprecate and delete --prefer-oldest, but there is little urgency to do so.
This is slightly difficult to do at present, since (as far as I can tell) the CLI flag parsing code doesn't have a way to deprecate flags.

In other places we throw a warning if we are running a function and see a legacy flag set, but that doesn't make sense to do here, since this flag can be passed to pretty much any command, and we currently do not record how the value was set (via prefer-version or prefer-oldest)

Contributor guide

Open the contributing guide

Research direction

Start by locating Cabal's CLI flag parsing code and the existing places that warn when a legacy flag is set. Determine how parsing can retain whether --prefer-version or --prefer-oldest supplied the value, then verify behavior across commands that accept the flag and confirm the deprecated form produces the intended warning before deletion is considered.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.