-
Notifications
You must be signed in to change notification settings - Fork 841
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
Making stack live better with multiple external GHC installations #2546
Comments
Quoting from the ML
@simonmar any clue when that happens? Stack usually doesn't do that on its own. Is it scripts using We might need a system-wide config setting to prevent that. If it needs to override There are still a few scenarios where stack shouldn't install GHC, including not-yet-supported Linux distros and users of GHC on 7.8.4 on OS X—stack can't install a working GHC there (see #2558). |
I don't recall exactly, but doesn't stack try to download GHC if it decides that it requires a different version than the one you have installed? I would like it to just fail and tell me why, and I'd like an option to use a specific GHC binary (last time I checked it could only use whatever was |
AFAIK stack never installs ghc unless |
I think one of the problems is that different projects will invariably have a different resolver set in their EDIT: I am talking about third party code here. Of course if it is your own project you would always use a resolver matching your compiler in the If I want to use just one system compiler I would like everything to compile with that one compiler without me explicitly having to change configs every time. Maybe we should provide a global config option to pin the preferred compiler. Then we can either use a global option or command line option to ask stack to automatically create/update a |
I am not sure if there are any other ways to specify the GHC binary (ping @mgsloan, @borsboom) but you could use a wrapper script around stack to specify your preferred GHC at the front of the PATH to make it choose what you want e.g.
|
Some related issues:
|
I've checked again and the PATH seems the only option. So you'd want a Would you be happier if Stack called ghc-7.10.3 rather than GHC (by default)? Would it address your use case, or make things worse? |
To clarify: |
Yes, ideally we would have both: |
Certainly good ideas! It'd be great to make it as easy as possible to easily develop ghc while using stack. There is already an issue for finding the system GHC by looking for executables named I have also opened this issue, tracking optimizing the workflow for developing ghc and using the development version with stack: #2633 I think between those two issues, we have this topic covered well. Please comment or re-open if there is more to be discussed! |
I found Simon Marlow's message on stack interesting:
https://mail.haskell.org/pipermail/haskell-community/2016-August/000159.html
I think stack could generally support better globally-installed GHC—we already have some issues on this (for instance about searching for system GHCs as ghc-7.10.3 instead of the path). This is a scenario for advanced users, but that includes me.
TODO: link here the existing issues and figure out whether they're sufficient.
The text was updated successfully, but these errors were encountered: