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
Feature request: Option to make a compiler available for all users #3935
On a build server used by many devs, the number of compilers installed by stack is basically O(n^2) - number of compilers needed times number of devs.
Proposal:
Support a global programs directory in the same place where the global config.yaml lives, e.g. /etc/stack/programs.
The global programs directory is structured the same way as the user programs directory (e.g. ~/.stack/programs).
If stack doesn't find the compiler it is looking for in the user programs directory, then instead of immediately failing it first looks in the global programs directory.
The --global option to stack setup tells stack to install the compiler in the global programs directory instead of the user programs directory.
Notes:
The build server problem can currently be solved by the "symlink hack", but that is awful in many ways.
The only potential downside is that users presumably need write access to the shared location in order to use it this way. Is the idea here that users only have read access to the "global programs"?
@DanBurton Right, normally the global programs will be accessed read-only. When a new GHC version is about to come into play, an admin would run sudo stack setup ... --global once, and we're set.
@borsboom Yes. And besides that, we want to avoid the complexities of per-user configuration, and shell-script/environment-variable hackery.
Activity
borsboom commentedon Mar 22, 2018
This sounds like a good approach to me.
DanBurton commentedon Mar 22, 2018
I don't quite understand. Doesn't this functionality basically already exist, in the form of the
STACK_ROOTenvironment variable?As an added bonus, not only are the compilers shared, but all libraries built in a snapshot package-db are shared as well.
https://docs.haskellstack.org/en/stable/GUIDE/#setting-stack-root-location
The only potential downside is that users presumably need write access to the shared location in order to use it this way. Is the idea here that users only have read access to the "global programs"?
borsboom commentedon Mar 22, 2018
ygale commentedon Mar 23, 2018
@DanBurton Right, normally the global
programswill be accessed read-only. When a new GHC version is about to come into play, an admin would runsudo stack setup ... --globalonce, and we're set.@borsboom Yes. And besides that, we want to avoid the complexities of per-user configuration, and shell-script/environment-variable hackery.
snoyberg commentedon Apr 2, 2019
Moved to wishlist https://github.com/commercialhaskell/stack/wiki/Wishlist