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

Comments

Projects
None yet
4 participants
@ndmitchell
Contributor

ndmitchell commented Sep 28, 2015

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

This comment has been minimized.

Contributor

borsboom commented Oct 6, 2015

@chrisdone / @snoyberg: any thoughts?

@snoyberg

This comment has been minimized.

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

This comment has been minimized.

Member

chrisdone commented Oct 9, 2015

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

This comment has been minimized.

Contributor

borsboom commented Oct 25, 2015

@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

'stack ghci': build project before launching GHCi (closes #1065, fixes
…#1180)

Optimistically, launch GHCi anyway even if the build fails.

borsboom added a commit that referenced this issue Oct 29, 2015

'stack ghci': build project before launching GHCi (closes #1065, fixes
…#1180)

Optimistically, launch GHCi anyway even if the build fails.

borsboom added a commit that referenced this issue Oct 31, 2015

'stack ghci': build project before launching GHCi (closes #1065, fixes
…#1180)

Optimistically, launch GHCi anyway even if the build fails.

borsboom added a commit that referenced this issue Oct 31, 2015

Adjust 'stack ide' pre-builds (#1065)
Don't build anything for 'stack ide targets', and only build
dependencies before 'stack ide start'

@borsboom borsboom removed the in progress label Oct 31, 2015

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