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
A user may want to delegate the installation of GHC to a 3rd party tool or use a custom shell script to have full control over how and where GHC is installed.
Specification
When stack requests a GHC version, it could:
check for the file $STACK_ROOT/hooks/ghc-install.sh
if the file is executable, invoke it with a set of environment variables set, e.g. GHC version (or commit/repo for the experimental building from source feature @hsyl20 )
read the stdout and treat it as the path to the GHC bin/ directory, so it knows where all the tools are
Rationale
Would allow ghcup to better integrate with stack, by providing a default hook
No maintenance overhead for the stack team, no need to actively integrate with installer tools
Great flexibility for users, they could even use nix or their package manager to install GHC
Requires no PATH shenanigans
This is a very common pattern, used by git, package managers and other tools. It has proven very powerful and light-weight.
I currently don't have the capacity to provide a reference implementation, but I'd guess the stack codebase is well structured that this wouldn't be a huge task.
@hasufell as you know there is an ongoing discussion of a proposal to solve this problem in a forum dedicated to the issue, which as we all know is highly delicate. Raising this issue here is really not going to help this process. I am closing it.
Motivation
A user may want to delegate the installation of GHC to a 3rd party tool or use a custom shell script to have full control over how and where GHC is installed.
Specification
When stack requests a GHC version, it could:
$STACK_ROOT/hooks/ghc-install.sh
bin/
directory, so it knows where all the tools areRationale
PATH
shenanigansOpen questions
References
I currently don't have the capacity to provide a reference implementation, but I'd guess the stack codebase is well structured that this wouldn't be a huge task.
@bgamari @emilypi
The text was updated successfully, but these errors were encountered: