Cabal: versioning of the hooks API

Folks, I've made some changes that affect the hooks API. It occurs to me that changes in this API will automatically break any Cabal Setup.lhs that is using the old API, and there isn't a good workaround, since when you say 'runhaskell Setup.lhs' you're at the mercy of whatever packages are visible to the default compiler. I wonder, should we explicitly version this API? That is, should we provide defaultMainWithHooks2, defaultMainWithHooks3...? That would at allow us some backwards compatibility, and make things break earlier and more predictably if the required version of Cabal isn't available. On the down side, it requires us to support multiple versions of the API simultaneously. We could use DEPRECATED pragmas to encourage people to update their Setup.lhs scripts. Thouhts? Cheers, Simon
participants (1)
-
Simon Marlow