Ticket #379 (closed defect: fixed)

Opened 5 years ago

Last modified 18 months ago

compiler directive of cabal-install's config file is case sensitive

Reported by: phigley Owned by:
Priority: normal Milestone:
Component: cabal-install tool Version: 1.2.3.0
Severity: normal Keywords:
Cc: Difficulty: normal
GHC Version: 6.8.3 Platform: Mac OS

Description

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.

Change History

Changed 4 years ago 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.

Changed 4 years ago by duncan

  • status changed from new to closed
  • resolution set to fixed

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.

Changed 18 months ago by elga

Changed 18 months ago by edouard

le code Rio, ou code de Releve d'Identite Operateur, est un code a 12 caracteres fourni par son operateur de telephonie mobile vous permettant de conserver votre numero de telephone lorsque vous changez d'operateur.  simyo

Note: See TracTickets for help on using tickets.