Description
This ticket exists to track the design of the a new 'Hooks' build-type. The 'Hooks' build type is the successor to the 'Custom' build type.
The Custom build type allows the build process to be completely modified, for example, a user can provide whatever buildHook
they want, and so higher-level tools such as cabal-install
and stack
have to treat packages with Custom build type as black boxes.
In practice, no one uses this full power of Custom
to completely change a phase, custom Setup.hs scripts augment rather than replace the build phases. The hooks interface we are designing will contain pre/post hooks for specific phases which
support this augmentation in a specific way.
The Hooks build type will be designed to subsume all known uses of Custom Setup.hs script.
Subsequently we hope to also fix a number of open tickets relating to the UserHooks interface by considering them in our design of the new SetupHooks interface.
- Componentwise hooks #7350
- Setup.hs: Clean hooks are no longer called. #7877
- cabal v2-clean does not run pre or postClean nor use the field extra-tmp-files. #6112
- Extended preprocessors support #6232
- Cabal new-copy or call postCopy hook from new-install #5933
- Hook redesign #3600
- LocalBuildInfo should change at build time when components are selected #2910