-
Notifications
You must be signed in to change notification settings - Fork 847
Description
I believe that with support for the custom-setup stanza, #2866 , we're using the snapshot / extra-deps version of Cabal for building anything with a custom-setup stanza.
For everything else, we're using the globally installed version of Cabal (the one updated via stack setup --upgrade-cabal). This can be nice, as you can update your Cabal version without needing to modify your configurations. This means that you can get bugfixes / enhancements without updating your build configs.
This seems inconsistent to me, I think it might simplify things to always use the snapshot / extra-deps version of Cabal.
Edit: One tricky detail that I'm only considering now that I've typed all this up, is that in order to build Cabal and its dependencies, we'll need to use an existing version of Cabal - likely the global one. So it seems hard to get full consistency of Cabal version used. Thoughts on this? Just special case Cabal and its transitive deps?
We'd get the following benefits:
- Better build reproducibility
- Ability to use a custom Cabal - Support using a custom Cabal #2910 - can even have it as a local package incase you need custom modifications
- Obviates the need for enhancing
stack setupto specify a cabal version to install (Addstack setup --install-cabal VERSIONin addition tostack setup --upgrade-cabal. #2386 / Add--cabal-install#2995) - Would fix Cabal version mismatch errors caused by lacking a custom-setup stanza - Stack is using a different version of cabal to install extra-deps packages #2924
- Obviates the need for a proposed
require-cabal-versionfield in stack.yaml - Add "require-cabal-version" and use this to enable Cabal-1.24 build plans #2479 - Removal of
stack setup --upgrade-cabalwould mean --upgrade-cabal wants write access to system ghc installation #2230 can be closed (case where it wants to write to a system ghc install)
This would add an implicit dependency on Cabal to every package. So, if Cabal or anything it depends on is installed locally, everything must be installed locally rather than in the snapshot.