-
Notifications
You must be signed in to change notification settings - Fork 90
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
Can stack utilize ghcup? #719
Comments
@mpilgrem any interest to discuss this? |
@hasufell, yes, indeed, but my attention has been elsewhere recently. There was a related discussion in the #stack-collaborators channel of the Haskell Foundation's Slack workspace recently - prompted, I think, by the Debian 10/11 glibc difficulties. The idea of a The UK's National Health Service says of the human appendix: 'Nobody knows exactly what it does, but removing it is not harmful.' I suspect that Stack's ability to manage GHC directly will, in time, become like the appendix. The popularity of Visual Studio Code and its (excellent) Haskell extension will see to that. GHCup providing a TUI for Windows users will accelerate the evolution. However - and perhaps this is just sentiment on my part - I would be reluctant to amputate the appendix before a serious case of appendicitis. If I were looking for rational reasons, I think I would point to the importancy of redundancy in the engineering of critical systems; and not disturbing CI scripts that assume that Stack will manage GHC and manage it in certain locations (I assume that CI scripts adapt to change less nimbly than people who use tools). |
I think my proposal is not entirely clear. What I'm suggesting is that nothing of stacks behavior changes at all, but that the implementation of GHC installation moves completely to GHCup... with all the logic that stack needs. Hence the idea to start supporting stack style GHC metadata. |
@hasufell, I think my lack of comprehension is because I do not know quite what it means for 'GHCup to start supporting Stack-style metadata'. This is my basic understanding of what Stack currently does: A user asks of Stack: "Use the binary distribution of (say) GHC 9.2.5 that is 'right for me'." Stack has to work out what architecture/system (in a detailed sense) the user is actually on, work out what is the best available binary distribution of GHC 9.2.5 for that architecture/system, fetch it, and put it somewhere where Stack can find it. It tries to do all that 'behind the scenes', but a sophisticated Stack user can interfere/override/configure, if the user wants to. In recent years, 'available' has, in practice, meant 'made available by the GHC developers' but it can mean 'available anywhere'. For Windows users, or Apple machines (Intel-based or Apple silicon), that is currently relatively simple. For users of Linux distributions, it can be complicated. There is also FreeBSD, which I know very little about. The heavy lifting is done by Stack's If a 'Stack 3.0' could depend on a dependable open source library (or, equivalently, a dependable command line tool) to do some or all of that, I can't see any barrier to that change. However, users of Stack < 3.0 would need to be supported in the old way, until the number of such users dwindled. |
Stack uses the following metadata to install GHC: https://github.com/commercialhaskell/stackage-content/blob/master/stack/stack-setup-2.yaml
It uses different "keys" than ghcup. Instead of going via distro/distroversion, it goes via things like
linux32-gmp4-nopie
, examining some system libraries (gmp, ncurses, tinfo).Further, it installs GHC into some private location under
~/.stack/programs/x86_64-linux/
or so.So, I'm not entirely sure what would stack need from ghcup to drop maintaining its GHC installation bits completely.
GHCup could start to:
Stack developers would need to decide:
@mpilgrem just putting this out here for discussion
The text was updated successfully, but these errors were encountered: