rrnewton / haskell-lockfree

A collection of different packages for CAS based data structures.
106 stars 25 forks source link

atomic-primops: Fix Setup.hs for current cabal versions #62

Closed bgamari closed 7 years ago

bgamari commented 7 years ago

While trying to reproduce GHC #11444 on GHC master I found that this no longer compiled due to improved encapsulation in the Cabal library.

RyanGlScott commented 7 years ago

Oh bother, it looks like old versions of Cabal didn't have mkVersion. I suppose custom-setup is needed here to CPP-guard the import of mkVersion?

bgamari commented 7 years ago

@ezyang, would you say this is a time for setup-depends?

How recently was mkVersion introduced?

ezyang commented 7 years ago

Unfortunately, mkVersion was introduced at the same time Version was made more abstract. But honestly, why not just drop this version check, and mandate cabal-version: >= 1.17 in the Cabal file?

RyanGlScott commented 7 years ago

But honestly, why not just drop this version check, and mandate cabal-version: >= 1.17 in the Cabal file?

I'd be OK with that, too. The obvious downside is that folks trying to build atomic-primops with older GHCs might have to upgrade their cabal-install installations, but that's certainly more doable than upgrading GHC itself.

@rrnewton: do you have a preference on whether we take the custom-setup approach or bump the minimum version bounds of cabal-install?

RyanGlScott commented 7 years ago

I talked to @rrnewton about this, and we came to the consensus that we should just increase the minimum required cabal-version to 1.18, which I did in eba9d198cf3bcf266b1a4a70f50a854a70309312. So now atomic-primops uses a simple Setup, so this has been obsoleted.