Skip to content
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 ghci before stack build fails #1065

Closed
ndmitchell opened this issue Sep 28, 2015 · 4 comments · Fixed by #1228
Closed

Stack ghci before stack build fails #1065

ndmitchell opened this issue Sep 28, 2015 · 4 comments · Fixed by #1228
Assignees
Milestone

Comments

@ndmitchell
Copy link
Contributor

C:\Neil\hlint>stack ghci
Using main module: Package `hlint' component exe:hlint with main-is file: C:\Neil\hlint\src\Main.hs
Configuring GHCi with the following packages: hlint
GHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help

<command line>:
    Could not find module `Paths_hlint'
    Use -v to see a list of the files searched for.
Failed, modules loaded: none.
Prelude> :q
Leaving GHCi.

That's after deleting my .ghci file and removing my .stack-work.

My guess is stack ghci should generate the paths file if it needs it. I thought it used to do a whole build before launching ghci? Using 06a4b27.

@borsboom
Copy link
Contributor

borsboom commented Oct 6, 2015

@chrisdone / @snoyberg: any thoughts?

@snoyberg
Copy link
Contributor

snoyberg commented Oct 9, 2015

That Paths module will have to be generated by Cabal, which unfortunately only happens from a call to build. I'm not deeply involved in the GHCi stuff, but it seems like a large number of issues are coming out of trying to avoid doing a full build before stack ghci starts, but that we just need to bite the bullet and do such a build anyway.

@chrisdone
Copy link
Member

Yep, I agree. It's time to just bite the bullet and do the build and cache-and-ignore any exceptions to retain the optimistic case of running ghci. I was thinking we could also add a trivial --no-build flag for impatient people like myself.

@borsboom
Copy link
Contributor

@chrisdone: currently stack targets and stack ide also both do an implicit build --only-dependencies beforehand and fail if that fails (since they use ghciSetup as well). Should their behaviour also be changed to match stack ghci's new behaviour?

borsboom added a commit that referenced this issue Oct 25, 2015
…#1180)

Optimistically, launch GHCi anyway even if the build fails.
borsboom added a commit that referenced this issue Oct 29, 2015
…#1180)

Optimistically, launch GHCi anyway even if the build fails.
borsboom added a commit that referenced this issue Oct 31, 2015
…#1180)

Optimistically, launch GHCi anyway even if the build fails.
borsboom added a commit that referenced this issue Oct 31, 2015
Don't build anything for 'stack ide targets', and only build
dependencies before 'stack ide start'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants