-
Notifications
You must be signed in to change notification settings - Fork 676
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
Use SetupHooks for Configure build-type #9969
base: master
Are you sure you want to change the base?
Conversation
5ce4da8
to
6aa1657
Compare
I've added a changelog entry. I've looked through the mentions of configure build-type in the documentation but it is all agnostic to the underlying implementation, so nothing had to be updated. There already exist many tests for the configure build type, so none had to be added either. This is a great improvement and future proofs |
Great work. How sure are we that existing Configure type builds will keep working as before? |
As long as the existing testsuite can observe configure build type for working, the new implementation is working in that it also works for the same testsuite. I’m not entirely sure if you can test divergence between the two (e.g. by comparing a substitution file or environment variables or something) since we didn’t keep the old implementation. |
This commit implements the Configure build-type in terms of Hooks, when build-type: Hooks is available (for Cabal >= 3.13). This moves Configure away from an implementation in terms of UserHooks, i.e. away from the Custom build-type.
I've built stackage with a patch that contains these changes and it has successfully built all packages (including e.g. |
Great 👌 I wasn't entirely sure we could have expected any change in semantic. |
@andreabedini would you like to officially approve this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Let me summarise:
- we leave
autoconfUserHooks
as it is - we introduce
autoconfSetupHooks
to expose the same logic (inrunConfigureScript
) with the new API. - cabal-install will prefer
autoconfSetupHooks
when it is available.
Do I have this right?
💯 👍
Yes. I suppose we could also remove |
For the sake of not breaking too many things, I would suggest leaving it. That you were able to implement both APIs on top of the same core logic suggests it's not going to be burden. |
This commit implements the Configure build-type in terms of Hooks, when build-type: Hooks is available (for Cabal >= 3.13).
This moves Configure away from an implementation in terms of UserHooks, i.e. away from the Custom build-type.
Template Α: This PR modifies the Cabal API, as it changes the type of the
runConfigureScript
function and exposesautoconfSetupHooks
fromDistribution.Simple
.