-
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
stack prefers ghc from .stack-work\install\…\bin over the one from PATH #1052
Comments
I've pushed a patch to master to pass in In general with build tools, however, we want to use them for building things (e.g., a Stack-built alex should be used instead of whatever's on the PATH). I'm OK special-casing this for GHC, but in general having an executable shadow the name of another build tool should be considered an error. |
Actually I'm a little surprised that stack-built build tools should be preferred over the PATH. I'd expect that Is there any way I can prevent build artifacts from affecting the build? Anyway, with the latest master everything works fine for me. Many thanks! :-) |
Consider the case of a tool like alex. Stack needs to build it in order for On Sun, Sep 27, 2015, 10:41 AM Michał Wawrzyniec Urbańczyk <
|
This fix seems to be broken in 0.1.6.0 release. Once again the compiled ghc gets used instead of the original one. It works fine if I use your commit 0548ee2 but when I upgrade to release version it is broken again. Should I try checking when exactly it got broken? |
That would be great. On Mon, Oct 19, 2015 at 8:00 PM, Michał Wawrzyniec Urbańczyk <
|
Done some bisecting, apparently the regression comes from 747cd0f . |
Would you be interested in trying your hand at a PR based on the previous On Tue, Oct 20, 2015, 4:37 PM Michał Wawrzyniec Urbańczyk <
|
I can give it my try. |
… should not be included (commercialhaskell#1052).
Ignoring stack-built `ghc` executables when looking for compiler for Setup.hs (#1052).
I'm closing this issue, it is fixed by #1210 . |
I have a package that compiles to the executable named
ghc.exe
.When building first time, everything works fine. The install step places the built
ghc.exe
in the.stack-work\install\x86_64-windows\lts-2.22\7.8.4\bin
directory. As expected.However, any subsequent
stack build
command will fail:To built it again I have to delete
.stack-work
directory.It is because stack tried to use
.stack-work\install\x86_64-windows\lts-2.22\7.8.4\bin\ghc.exe
— that is not an actual GHC but the locally built package that was just named so.I expect that
stack
should prefer ghc.exe from PATH or itsghc-paths
over the built executables. The results of build should not affect subsequent builds, and overwriting the compiler executable should not be implicit.The text was updated successfully, but these errors were encountered: