Skip to content

Conversation

@glguy
Copy link
Contributor

@glguy glguy commented Apr 26, 2017

Development versions of cabal-install or Cabal (I'm not sure which) will assume that if you don't provide a custom-setup section in your Cabal file that you don't support new versions of Cabal.

@hvr has updated the cabal-file metadata for HsOpenSSL to work with development versions of Cabal already. Putting this change into the repository will ensure that those changes survive for the next release.

Additionally I've update the Setup.hs to decide which code to use based on the Cabal version and not the GHC version. With new-build in particular GHC and Cabal versions are not related.

{-# LANGUAGE CPP #-}
{-# LANGUAGE TupleSections #-}

#ifndef MIN_VERSION_Cabal
Copy link
Contributor

Choose a reason for hiding this comment

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

just in case this doesn't seem obvious: the trick here is MIN_VERSION_Cabal is defined and available to custom Setup.hs scripts if either GHC >= 8.0 or cabal-install >= 1.24 is used. So if it isn't defined, it's very likely we don't have Cabal >= 2.0.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you. Am I right that "Custom-setup" stanza is only supported in cabal-install >= 1.24 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right. Older versions of Cabal don't know what that section is and will issue a warning and ignore it.

@vshabanov vshabanov merged commit 1f94450 into haskell-cryptography:master Apr 26, 2017
@vshabanov
Copy link
Collaborator

It's nice that older cabal-install will still work.

Merged and uploaded on Hackage (HsOpenSSL-0.11.4.8)

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

Labels

None yet

3 participants