[Hackage] #718: Behaviour of postCopy and postInstall hook is confusing

#718: Behaviour of postCopy and postInstall hook is confusing ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.2 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- While working on the Bluetile cabal package ( http://hackage.haskell.org/package/bluetile ) I used Cabal's hook system to install executables to the libexec directory. It took me a while to figure out that the postCopy hook is _the only hook_ to run when you invoke 'cabal copy' and the postInstall hook is _the only hook_ to run when you invoke 'cabal install'. This is both confusing and unfortunate. Since the Cabal documentation elsewhere states that 'cabal install' is just "register + copy" one would assume that upon 'cabal install' the postCopy hook runs as well. Now I had to write two hooks, both for postCopy and for postInstall, to make it work for users that run 'cabal install' as well as cases where 'cabal copy' is used (for example by distributions, while preparing their packages). This can probably not be fixed without breaking a bunch of Cabal packages, so maybe some kind of warning or big note in the documentation would help in the meantime. Best regards! Jan -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/718 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#718: Behaviour of postCopy and postInstall hook is confusing ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.2 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by duncan): Yes it's pretty crazy and confusing. I'm not sure we can change it easily however as I think it would break old packages (that's why we'd not done it already). Though perhaps someone could look at how a smooth transition might work. Alternatively we have to wait for a full redesign of the hooks interface. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/718#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage