[Hackage] #223: allow per-package configuration options in config file

Hackage trac at galois.com
Tue Jan 29 13:18:33 EST 2008


#223: allow per-package configuration options in config file
---------------------------------+------------------------------------------
  Reporter:  duncan              |        Owner:           
      Type:  enhancement         |       Status:  new      
  Priority:  normal              |    Milestone:  Cabal-1.4
 Component:  cabal-install tool  |      Version:  1.2.3.0  
  Severity:  normal              |     Keywords:           
Difficulty:  normal              |   Ghcversion:  6.8.2    
  Platform:                      |  
---------------------------------+------------------------------------------
 Currently only a subset of the configure command line flags can be stored
 in cabal-install's config file. There is no particularly good reason for
 this. It should be reasonably straightforward to do it generically and
 allow all configure options to be kept in the config file.

 This may require some unification of the API for managing command line
 flags (the Simple.Command module) and the API for loading and saving from
 config flags (in ParseUtils).

 Once this is done, it should be straightforward to keep per-package config
 options as well as global options in the cabal-install config file.

 These could be used to augment the options used when configuring a
 package. The order of overriding in cabal-install is currently:
 {{{
 savedConfig `mappend` configFlags
 }}}
 That is, the configure options from the config file are overridden by the
 ones supplied on the command line. With per-package saved config we would
 extend this to:

 {{{
 globalSavedConfig `mappend` packageSavedConfig pkg `mappend` configFlags
 }}}

 ie per-package saved, overrides global saved, but command line still
 overrides everything.

 The slightly tricky bit is in how the api for config files and command
 line flags should be made to work better with each other, so that one set
 of information can be read/written from either source. The rest should be
 straightforward.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/223>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects


More information about the cabal-devel mailing list