Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate, then remove, Stack's support of Cabal < 2.2 #6377

Closed
mpilgrem opened this issue Dec 14, 2023 · 7 comments
Closed

Deprecate, then remove, Stack's support of Cabal < 2.2 #6377

mpilgrem opened this issue Dec 14, 2023 · 7 comments
Assignees

Comments

@mpilgrem
Copy link
Member

Stack makes use of Cabal (the library) by building/using a small executable which depends on the version of Cabal that is provided with the specified version of GHC.

The motivation for Stack ceasing to support Cabal < 2.2 in that way is @theobat's explanation at #6356 (comment). In short, the barriers to introducing Stack support for component-based builds (which might help unlock things like better HLS support for Stack) would be lowered.

Cabal-2.2.0.0 was uploaded to Hackage on 8 March 2018. It is provided with GHC 8.4.1, released on the same date. Stackage LTS Haskell 12.0, published 9 July 2018, was based on GHC 8.4.3 (replacing LTS 11.22, based on GHC 8.2.2).

On 4 December 2023, at the Haskell Community, Reddit, Slack (#stack-users, #stack-collaborators), and Matrix (rooms: Stack and Stackage, Cabal and Hackage), I asked people to flag if important it was important to them in practice that the next version of Stack supports a version of GHC before GHC 8.4.1. My emphasis was on the practical requirement, not matters of principle. So far, although it has been only 10 days, no person has flagged that it is important to them. The Reddit post has had 3,400 views; the HC post 622 views. Some people have expressly said that no weight should be placed on pre-GHC 8.4.1 support, including a past member of the Board of the Haskell Foundation.

@hasufell, helpfully, identified that current versions of certain key GHC boot libraries are dropping support for GHC < 8.6. However, there is a difference between the current version of a library dropping support and a build tool dropping support. In contrast to Stack, Cabal (the tool) does not promise to support GHC versions released more than three years ago.

My proposal is to deprecate Stack's support of Cabal < 2.2 in the next version of Stack after Stack 2.13.1 (by announcing that when it is released) with a plan of removing it (unless there is relevant protest) in the version after that.

@mpilgrem
Copy link
Member Author

Another data point is that since 1 October 2023, the default stack new template has required Cabal >= 2.2 (see commercialhaskell/stack-templates#136) but no user of Stack has reported that has inconvenienced them.

@mpilgrem
Copy link
Member Author

Another motivation for Stack ceasing to support Cabal < 2.2 and, consequently, Cabal < 2.0, is #3486 (comment) and resolving Stack's current behaviour of building all executable components on first build of a local package.

@mbj
Copy link
Contributor

mbj commented Dec 17, 2023

@mpilgrem If a project where to depend hard on Cabal < 2.2, or GHC < 8.4 than they can also still continue to use the older stack releases. AKA its not like a new stack release does block these projects from using stack, just the newer releases.

"sedimentation of software stacks" is a normal process and should not be avoided to aggressively to not hinder forward evolution.

@mbj
Copy link
Contributor

mbj commented Jan 15, 2024

Another motivation is to be able to depend on a cabla version that has the fix for this stack issue: #6251

TLDR: If people need support for older cabal, they can also use older stack.

@mbj
Copy link
Contributor

mbj commented Jan 15, 2024

@mpilgrem Do we actually need a deprecation period?

@mpilgrem
Copy link
Member Author

@mbj, to have Stack use a particular version of Cabal (the library) (e.g. one known not to have a particular bug) you need to specify a snapshot that specifies a version of GHC that has that version of Cabal as its boot library. That will not change with what is planned.

In terms of timing, I plan to release Stack 2.15.1 soon and then make the changes in the master branch which will mean new Stack cannot make use of old Cabal. Stack 2.15.1 was delayed by a few things: see #6397 for a checklist.

@andreasabel
Copy link

Maybe if you want to drop support for older LTSs, you should bump the major-major number and release the next as stack-3.1.1. Then one could with less effort communicate that "Stack 2" is needed to build old projects.

So far, Stack promised in theory unlimited support for older Haskell projects. One of the beneficiaries is the Agda-parametric prototype https://github.com/agda/agda/tree/parametric which can build with GHC 7.10 and 8.0 (porting it to a recent GHC would be unreasonable effort). It is still easy to build it by

If Stack drops LTSs now, one also needs to install the correct version of Stack first. In a decade or so it will already be very difficult to install stack-2.13, I suppose. I do not think GHCup will provide binaries of old Haskell tools for new architectures...

Seeing support for older LTSs go is a bit sad, for this reason.

Along the lines of Agda-parametric, many more POPL or ICFP software artefacts might be affected...

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

No branches or pull requests

3 participants