haskell / haskell/cabal

Behaviour of postCopy and postInstall hook is confusing

未关闭
#709 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Cabal: other type: bug
主要语言
Haskell
星标
1.7k
派生
750
平均合并
4 天 3 小时
30 天内合并 PR
28

描述

(Imported from [Trac #718](http://hackage.haskell.org/trac/hackage/ticket/718), reported by guest on 2010-07-24)

While working on the Bluetile cabal package ( [http://hackage.haskell.org/package/bluetile](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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。