Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Parsing ~/.cabal/config fails when the 'verbose' setting is uncommented #980

Closed
23Skidoo opened this Issue · 1 comment

3 participants

@23Skidoo
Collaborator

Steps to reproduce (with a fresh ~/.cabal/config):

  1. Uncomment the line verbose: 1 in ~/.cabal/config
  2. Run cabal update

This results in the following error:

cabal: Command.optionToFieldDescr: feature not implemented

This happens because optionVerbosity in D.S.Setup produces an OptArg option, but optionToFieldDescr in D.S.Command doesn't handle such options:

OptArg _ _ _ _readE _ _ -> -- The behaviour in this case is not clear, and it has no use so far,
                           -- so we avoid future surprises by not implementing it.
                           error "Command.optionToFieldDescr: feature not implemented"

What is the correct way to fix this? Change optionVerbosity to a ReqArg option or make viewAsFieldDescr a total function?

@kosmikus
Collaborator

I was aware of this, and actually thought there's an open bug about this issue, but now I can't find it ...

@23Skidoo 23Skidoo referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@tibbe tibbe closed this issue from a commit
@23Skidoo 23Skidoo Make 'viewAsFieldDescr' a total function.
Fixes #980 by allowing to create config fields from options with optional
arguments. Without this change, setting the 'jobs' or 'verbose' fields in the
config file results in a fatal error on startup.
bb38831
@tibbe tibbe closed this in bb38831
@tibbe tibbe referenced this issue from a commit
@23Skidoo 23Skidoo Make 'viewAsFieldDescr' a total function.
Fixes #980 by allowing to create config fields from options with optional
arguments. Without this change, setting the 'jobs' or 'verbose' fields in the
config file results in a fatal error on startup.
d50b2d3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.