You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should we avoid include newer versions of the Cabal library? #4425
We had some discussions of this previously (I honestly don't remember where, I think on some PR). Essentially: including newer versions of the Cabal library is a good thing, in that users get improvements released since the version of Cabal shipped with GHC. And it's a bad thing, because it forces users to build a very heavy-weight library. I recently answered a Stack Overflow question about this:
This is a good question, and I don't see any "obviously right" answer.
On one hand, I theoretically prefer using the newer versions, and having good documentation about how to "opt out" (as demonstrated in that StackOverflow answer). It's true that there is a build cost to using newer versions of Cabal, but stack's dependency caching mechanisms at least make it so you don't have to pay that cost too often. The version of the world I want to see is one where builds of such common libraries are already cached by a trusted party for all relevant platforms, but alas, that is not yet the world we live in.
On the other hand, it seems extremely unlikely that users will ever actually need or even care about those improved Cabal versions. Users who do can pull them in easily. 99.99% of use cases are likely satisfied by using the Cabal that ships with GHC.
Locking Cabal to the GHC-shipped version, however, would also lock all of its dependencies (bytestring, text, containers). I think it's likely ok to do this, but we should always reserve the ability to depart from these versions for the sake of critical bugfixes and so forth.
bytestring, containers and various others are already locked by the ghc package (until the "make the ghc package rebuildable" issue is fixed), so text is possibly the only relevant one to mention here.
I think it's likely ok to do this, but we should always reserve the ability to depart from these versions for the sake of critical bugfixes and so forth.
I definitely agree here, we should always feel free to unpin if there's a strong motivation.
Activity
DanBurton commentedon Mar 18, 2019
This is a good question, and I don't see any "obviously right" answer.
On one hand, I theoretically prefer using the newer versions, and having good documentation about how to "opt out" (as demonstrated in that StackOverflow answer). It's true that there is a build cost to using newer versions of Cabal, but stack's dependency caching mechanisms at least make it so you don't have to pay that cost too often. The version of the world I want to see is one where builds of such common libraries are already cached by a trusted party for all relevant platforms, but alas, that is not yet the world we live in.
On the other hand, it seems extremely unlikely that users will ever actually need or even care about those improved Cabal versions. Users who do can pull them in easily. 99.99% of use cases are likely satisfied by using the Cabal that ships with GHC.
Locking Cabal to the GHC-shipped version, however, would also lock all of its dependencies (bytestring, text, containers). I think it's likely ok to do this, but we should always reserve the ability to depart from these versions for the sake of critical bugfixes and so forth.
DanBurton commentedon Mar 18, 2019
bytestring,containersand various others are already locked by theghcpackage (until the "make the ghc package rebuildable" issue is fixed), sotextis possibly the only relevant one to mention here.snoyberg commentedon Mar 19, 2019
I definitely agree here, we should always feel free to unpin if there's a strong motivation.
juhp commentedon Mar 23, 2020
I think we are using ghc Cabal in recent Stackage streams?
Shall we close this out?
qrilka commentedon Mar 23, 2020
If so then I suppose we should explicitly remove it from build-constraints and not only comment it out (as it is right now).
snoyberg commentedon Mar 23, 2020
I prefer commented out: it makes it easier to see that it is intentionally excluded.