install hook (Custom setup) is not called on Setup copy/register
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Summary by @ezyang.** Install hooks are called when `./Setup install` is invoked, but this command was misguided because it's just a combination of `copy` and `register`. Some design discussion is at https://github.com/haskell/cabal/commit/dda6ffed28f10f521f9c0d3cb0773a46ae3940f1#commitcomment-6290689
---
After upgrading to cabal 1.20 my custom builds no longer work because of an instHook not being called. I've created a repository that has "die" function in its instHook and still invoking "cabal install" on it doesn't result in an error message.
You may see an example of what I'm talking about in my https://github.com/anton-dessiatov/dummy_cabal repository. I'm expecting that invoking "cabal install" on that dummy project writes "MY INSTALL HOOK!" and fails, but it doesn't print anything and finishes successfully.
Contributor guide
Research direction
Start with the dummy_cabal repository and reproduce the behavior through `cabal install` and `./Setup install`; compare the `copy` and `register` entry points described in the issue. Review the linked design discussion before deciding what the intended hook behavior is. Done means the expected `MY INSTALL HOOK!` output appears and the custom hook failure is observed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100