[Hackage] #773: Default value for flag ignored, but explicit flag assignment is honored

#773: Default value for flag ignored, but explicit flag assignment is honored ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.6 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- In a cabal file, I specify the default value of a flag as True. When Setup.hs configure is invoked without an option, Setup.hs configure uses the value false! The bug only seems to occur when the body of the conditional has a Build-Depends assignment. The attachments contain a transcript that demonstrates the problem and the package used to demonstrate the problem. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/773 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#773: Default value for flag ignored, but explicit flag assignment is honored ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.6 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by malcolm.wallace@…): This is not a bug, it is a design feature. The "default" value of a flag is only a hint to the constraint solver that it should try using that flag value first, before trying other values. If the constraint solver was unable to find a valid solution to the dependencies using your default value of "True", then it continues looking with the value "False", and then apparently does find a valid solution respecting all dependencies listed there. However, if you specify a flag value on the command-line, the constraint solver will not try using other values for flags: it trusts that the user really wants what they explicitly asked for. In your case, I think if you specify True for the value of the flag on the commandline, the solver will probably fail to find a solution, and tell you why. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/773#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#773: Default value for flag ignored, but explicit flag assignment is honored ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: closed Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.6 Severity: normal | Resolution: invalid Keywords: | Difficulty: unknown Ghcversion: | Platform: ----------------------------+----------------------------------------------- Changes (by igloo): * status: new => closed * resolution: => invalid Comment: If you do want to force a flag to be True unless overridden on the command-line then you can use {{{ manual: True }}} -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/773#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage