-
Notifications
You must be signed in to change notification settings - Fork 710
Componentwise hooks #7350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Similar to #2910 |
I believe this is now possible with a per-component pre-build hook, using |
Is there documentation for this new build type somewhere? |
It's going to be included in the next Cabal release, 3.14. The documentation is here, but some links won't work due to the fact that the For the time being, I would suggest reading the HF tech proposal. (I'm updating the link in a separate PR as it is currently wrong in the documentation, I realise.) |
I have a use case for running some random
IO
action just before each component is built. It is important that my action is run interleaved with the build itself, since theIO
action for a component may require the build artifacts of other components that are earlier in the dependency list. TheIO
action returns an editedBuildInfo
, which is then passed to the normal build hook.I have a prototype implementation at https://github.com/gergoerdi/clashilator/blob/c2561e8465ba235aa4836e3bfae35f84fa578d26/src/Clash/Clashilator/Cabal.hs. I'm not too happy with how deeply it has to fiddle with Cabal internals, so it would be better if this, or something similar to this, was exposed via the Cabal API.
The text was updated successfully, but these errors were encountered: