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 haddock" fails when using system GHC #85

Closed
arotenberg opened this Issue Sep 6, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@arotenberg

arotenberg commented Sep 6, 2015

See this StackOverflow question. In short, the following fails with an error about base not being in the build plan on a fresh 64-bit Windows 7/8 MinGHC 2015-08-13 installation:

stack new stack-test new-template
cd stack-test
stack haddock

Changing "stack haddock" to "stack haddock --install-ghc --no-system-ghc" makes it work.

@snoyberg

This comment has been minimized.

Member

snoyberg commented Sep 7, 2015

I just tested, and I'm unable to reproduce the problem. Can you capture the full output of the following commands and put them in a paste:

stack path
stack exec which ghc
stack haddock --verbose
ghc-pkg describe base --expand-pkgroot
stack exec -- ghc-pkg describe base --expand-pkgroot
@arotenberg

This comment has been minimized.

arotenberg commented Sep 7, 2015

Interesting, it only happens when I install MinGHC in a directory in C:\Program Files. If I let the installer use the default install location in AppData\Local\Programs, the issue doesn't occur. However, if I install in Program Files, the issue occurs even if I run the commands with admin privileges.

Output from the commands you listed: https://gist.github.com/arotenberg/030e00254737a98496b5

@snoyberg

This comment has been minimized.

Member

snoyberg commented Sep 8, 2015

That certainly narrows it down, sounds like a bug in stack's Haddock code not knowing how to handle quoted filepaths. We'll get that fixed for the next release (pinging @borsboom), but it looks like you at least have a decent workaround until then.

@snoyberg

This comment has been minimized.

Member

snoyberg commented Sep 8, 2015

OK, I've pushed a commit to stack that addresses this problem. If you build from master, stack should work with your install of MinGHC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment