[Hackage] #328: cabal-install passing --distpref to Setup.hs compiled with older Cabal lib

#328: cabal-install passing --distpref to Setup.hs compiled with older Cabal lib ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: HEAD Severity: normal | Keywords: Difficulty: normal | Ghcversion: 6.8.2 Platform: | ---------------------------------+------------------------------------------ Recently, while developing a package here in the group, we changed the build-type from "Simple" to "Custom" to allow for "cabal test". The Setup.hs simply calls defaultMainWithHooks with simpleUserHooks where runTests has been redefined. The problem is that this change gives me the following error when invoking "cabal build" (after invoking "cabal configure"): {{{ setup.exe: Unrecognised flags: --distpref=dist }}} runhaskell Setup.hs build works fine, though. This happens on a win64 machine, cabal-install version 0.5.1 using version 1.4.0.1 of the library. On a mac there seem to be no problems, though. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/328 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#328: cabal-install passing --distpref to Setup.hs compiled with older Cabal lib ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: HEAD Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Comment (by duncan): So what needs to be worked out is why it's passing a non-empty value for --distpref at all. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/328#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#328: cabal-install passing --distpref to Setup.hs compiled with older Cabal lib ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: HEAD Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Changes (by dreixel): * cc: jpm@cs.uu.nl (added) Comment: When invoked with -v3: {{{
cabal build -v3 Using external setup method with build-type Custom Creating dist\setup (and its parents) Using Cabal library version 1.2.4.0 Using Setup.hs as setup script. ("dist\\setup\\setup.exe",["build","--verbose=3","--distpref=dist"]) setup.exe: Unrecognised flags: --distpref=dist dist\setup\setup.exe returned ExitFailure 1 }}}
Additionally, I found out that this problem no longer occurs after I upgraded to GHC 6.8.3 (from 6.8.2) and reinstalled Cabal and cabal- install... -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/328#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#328: cabal-install passing --distpref to Setup.hs compiled with older Cabal lib ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: HEAD Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Comment (by duncan): Replying to [comment:2 dreixel]:
Additionally, I found out that this problem no longer occurs after I upgraded to GHC 6.8.3 (from 6.8.2) and reinstalled Cabal and cabal- install...
Yes, the reason for that is that you would then have Cabal-1.4.x installed and cabal-install will prefer to compile Setup.hs scripts using that version. Previously it was forced to use a 1.2.x version of the Cabal library (which does not understand `--distpref`). Still, it is supposed to work with older versions of the lib by omitting parameters if necessary. So I'll have to work out why it's passing the default distpref rather than empty. Are you using the released cabal-install-0.5.1 or the darcs version? -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/328#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#328: cabal-install passing --distpref to Setup.hs compiled with older Cabal lib ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Cabal-1.4 Component: cabal-install tool | Version: HEAD Severity: normal | Resolution: Keywords: | Difficulty: very easy (<1 hour) Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Changes (by duncan): * difficulty: normal => very easy (<1 hour) * milestone: => Cabal-1.4 Comment: I found the problem. We were using the default flags for build (and other commands) rather than an empty set of flags. The fix will be in cabal-install 0.5.2 -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/328#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#328: cabal-install passing --distpref to Setup.hs compiled with older Cabal lib ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Cabal-1.4 Component: cabal-install tool | Version: HEAD Severity: normal | Resolution: Keywords: | Difficulty: very easy (<1 hour) Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Comment (by dreixel): Replying to [comment:4 duncan]:
I found the problem. We were using the default flags for build (and other commands) rather than an empty set of flags.
The fix will be in cabal-install 0.5.2
Good. Since I now had 6.8.3, I rolled back to 6.8.2 and reinstalled Cabal and cabal-install to reproduce the problem (from the releases). But actually I wasn't being able to reproduce it, so I started wondering if I had done something weird before. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/328#comment:5 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#328: cabal-install passing --distpref to Setup.hs compiled with older Cabal lib ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: defect | Status: closed Priority: normal | Milestone: Cabal-1.4 Component: cabal-install tool | Version: HEAD Severity: normal | Resolution: fixed Keywords: | Difficulty: very easy (<1 hour) Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Changes (by duncan): * status: new => closed * resolution: => fixed Comment: Fixed by the changes in setup/config handling from a few days ago. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/328#comment:6 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage