[Hackage] #379: compiler directive of cabal-install's config file is case sensitive
#379: compiler directive of cabal-install's config file is case sensitive ---------------------------------+------------------------------------------ Reporter: phigley | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.2.3.0 Severity: normal | Keywords: Difficulty: normal | Ghcversion: 6.8.3 Platform: Mac OS | ---------------------------------+------------------------------------------ Using cabal-install 0.6.0 (and 1.6.0.1 of the Cabal library) the following line fails to parse in the config file (in ~/.cabal/config) : compiler: GHC which generates the following error : Warning: Error parsing config file /Users/peterhigley/.cabal/config:1: "GHC" Warning: Using default configuration. But changing it to this resolves the problem : compiler: ghc My config file was auto-generated from an older cabal-install. This is easiest to reproduce by running "cabal update". I am reproing on a Mac, but an e-mail was sent to haskell-cafe from a Windows user as well. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/379> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#379: compiler directive of cabal-install's config file is case sensitive ---------------------------------+------------------------------------------ Reporter: phigley | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.2.3.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.3 | Platform: Mac OS ---------------------------------+------------------------------------------ Comment (by duncan): This is a more tricky problem than it looks. The reason is we're now parsing the config file by converting the command line parser. It has flags for `--ghc`, `--hugs` etc and is case sensitive. Really we'd like a config field flag parsed using the `Text` instance for `CompilerFlavor` because that is not case sensitive. Doing this properly involves rewriting the command line option / config file field description subsystem. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/379#comment:1> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#379: compiler directive of cabal-install's config file is case sensitive ---------------------------------+------------------------------------------ Reporter: phigley | Owner: Type: defect | Status: closed Priority: normal | Milestone: Component: cabal-install tool | Version: 1.2.3.0 Severity: normal | Resolution: fixed Keywords: | Difficulty: normal Ghcversion: 6.8.3 | Platform: Mac OS ---------------------------------+------------------------------------------ Changes (by duncan): * status: new => closed * resolution: => fixed Comment: Fixed with a bit of a hack: {{{ Fri Jan 16 00:28:51 GMT 2009 Duncan Coutts <duncan@haskell.org> * Parse compiler field from old config files correctly Really old versions of cabal-install generated a default config containing "compiler: GHC". Sadly the new way we generate the config file parser from the command line parser means we end up with a case-sensitive parser as it only matches the exact command line flags. So we hack it and add in a traditional parser for that field only. Really the command line and config file infrastructure needs rewriting again. Sigh. }}} -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/379#comment:2> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
participants (1)
-
Hackage