-
Notifications
You must be signed in to change notification settings - Fork 844
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
Question: custom GHC path in stack.yaml? #725
Comments
No, there's no such functionality right now. The primary concern I'd have is that it would make your project tied to a specific machine's configuration. |
Makes sense. It would be bad practice for release, but I think it's still useful for development. With cabal, I could put it in a It also occurs to me that if I want to use a GHC installed at a non-standard location for all my projects, I could symlink it to where stack searches for its personal copies if I knew the exact naming scheme. My specific usecase is that I want to use a patched 7.10.2 to build stackage nightlies and eventually LTS. |
Got reminded on Reddit about this: I should have pinged this issue when #798 got merged to master, which will allow you to do something like: extra-path:
- /path/to/ghc/bin |
Awesome. I think that solves my problem. |
I had to do this to make stack pick up my custom ghc I built from the ghc source dir: First in my ghc source dir, Then in
Note: This is only for when you're hacking on GHC incrementally. If you just want to use a different bindist, see How to use different ghc builds with stack?. |
Is there a better way to do this these days or is the comment above still the best option? |
Trying @nh2 's technique and getting linker error partway through a big
|
@jberryman Can you clean and rebuild just to make sure you aren't suffering from Also, which of the two techniques I mentioned are you using the one for
or the other one? |
@nh2 sorry, yes "hacking on ghc". Yeah I've tried clean --full, as well as setting |
@jberryman Hmm, then I'm not sure, especially given that you apparently have a missing symbol in something as basic as |
Thanks it's a multiproject stack repo with some random libraries I wonder if you can repro with It seems to be related to lens's use of a Appreciate the tip. I'm going to move on for now, and don't want to clutter this ticket anymore. EDIT2: I wonder if it has something to do with the ordering of package dbs (inplace ghc's are last): Line 181 in 3bb2a02
|
@jberryman I care about this workflow working, so I'd be happy to help with it. But can you make me some detail instructions on what to do?
With what exact |
@nh2 This advice no longer works on stack 2:
And
|
An alternative approach that seems to work is:
We don't need
because Because that path appears higher up in the PATH list:
I think you need a |
Here's a full log of my results:
Move the bin to the compiler-tools dir:
Then it works:
|
Is there a way to tell stack to use GHC at a specific location for a project? I don't want to put it on the path every time I run stack for that project.
The text was updated successfully, but these errors were encountered: