Skip to content

Add 'Hooks' to the build-types (since cabal 3.14) - #616

Closed
lxsameer wants to merge 0 commit into
sol:mainfrom
lxsameer:main
Closed

lxsameer wants to merge 0 commit into
sol:mainfrom
lxsameer:main

Conversation

@lxsameer

@lxsameer lxsameer commented Jul 4, 2025

Copy link
Copy Markdown

Cabal >=3.14, introduced Hooks build type that supposed to be the replacement for old Setup.hs stuff. This little patch just adds that to the BuildType data type so users can start using it.

@sol sol left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi 👋

Thanks for looking into this!

Can you please:

  • update the tests
  • update the README
  • infer cabal-version: 3.14 when build-type: Hooks + add corresponding test
  • add changelog entry

I think we also want to default build-type to Hooks when SetupHooks.hs exists. But that can be a separate PR.

@mpilgrem

mpilgrem commented Jul 4, 2025

Copy link
Copy Markdown
Collaborator

@lxsameer, see Hpack.Config.makeCabalVersion.

@mpilgrem

mpilgrem commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

@lxsameer, sorry - I messed up trying to rebase your fork branch main for the passage of time and I have lost from your fork:

data BuildType =
    Simple
  | Configure
  | Make
  | Custom
  | Hooks
  deriving (Eq, Show, Enum, Bounded)

I think the simplest thing is for me to open a new pull request. See:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants