Skip to content

Stack ghci before stack build fails #1065

Closed

Description

@ndmitchell
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.

Activity

  1. borsboom commented on Oct 6, 2015

    @borsboom
    Contributor

    @chrisdone / @snoyberg: any thoughts?

  2. snoyberg commented on Oct 9, 2015

    @snoyberg
    Contributor

    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.

  3. chrisdone commented on Oct 9, 2015

    @chrisdone
    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.

  4. added this to the P1: Must milestone on Oct 9, 2015
  5. self-assigned this
    on Oct 9, 2015
  6. borsboom commented on Oct 25, 2015

    @borsboom
    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?

  7. added 4 commits that reference this issue on Oct 25, 2015
    a612c11
    952548f
    29eaedb
    1c33b95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions