Ticket #947 (new enhancement)

Opened 13 months ago

Last modified 13 months ago

let "cabal -fSomeFlag" produce error for undeclared flags

Reported by: Oblosys Owned by:
Priority: normal Milestone: cabal-install-0.14.2
Component: cabal-install tool Version: 1.14.0
Severity: normal Keywords:
Cc: Difficulty: unknown
GHC Version: Platform:

Description (last modified by kosmikus) (diff)

Typos in flags can lead to confusing problems, especially with large projects that take a long time to build. A simple check could be quite useful:

~> hconfigure -fNonExistentFlag -fSomeFlag
cabal: undeclared flag 'NonExistentFlag'. Declared flags are:
  ExistentFlag, SomeFlag

Change History

Changed 13 months ago by kosmikus

  • description modified (diff)

Changed 13 months ago by kosmikus

  • version changed from 1.10.2.0 to 1.14.0
  • milestone set to cabal-install-0.14.2

There are a few things to keep in mind:

  • Flag constraints can be given for arbitrary packages, not just for targets.
  • It multiple targets are specified, -f flags apply to all targets.
  • Not every version of a package declares the same flags.

So whatever we end up doing: a warning might be ok, an error almost certainly isn't. Even a warning has to be designed carefully so that it isn't just perceived as noise.

Note: See TracTickets for help on using tickets.