[MacPorts] #62228: haskell-stack 1.0: set stack root to home directory
MacPorts
noreply at macports.org
Sat Feb 6 00:22:27 UTC 2021
#62228: haskell-stack 1.0: set stack root to home directory
--------------------+--------------------
Reporter: Ionic | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port:
--------------------+--------------------
Stack root is currently defined as `${workpath}/.stack`.
That's... okay, but leads to a weird issue (probably due to a bug in stack
itself): during the destroot phase, it ignores this environment variable,
uses `~/.stack` instead, re-downloads GHC, populates that directory and,
worst of all, rebuilds all the packages.
This rebuild is not just wasteful, but actually triggers a second bug in
stack: it doesn't pass down GHC options (which I need for `legacy-support`
integration) during `stack install`/`stack build --copy-bins`. So the
rebuild will fail and I have no idea how to fix stack to pass down the
given GHC options.
Now, this said, we can easily fix that by defining the stack root relative
to the home directory. This sounds a bit dangerous, but shouldn't be,
since we set `$HOME` to `${workpath}/.home`.
I could have committed this myself, but I'm looking for comments.
Case in point: if I set `haskell_stack.stack_root
"${workpath}/.home/.stack`, the second rebuild in the destroot phase
vanishes completely.
--
Ticket URL: <https://trac.macports.org/ticket/62228>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list