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

GHCi with internal libraries only works after a build #4148

Open
mihaimaruseac opened this Issue Jul 11, 2018 · 8 comments

Comments

Projects
None yet
3 participants
@mihaimaruseac
Contributor

mihaimaruseac commented Jul 11, 2018

General summary/comments (optional)

When running stack ghci on a fresh clone of a project having internal libraries, the attempt fails with

<command line>: cannot satisfy -package z-files-z-lib
    (use -v for more information)

However, if one first stack builds then the subsequent stack ghci succeeds.

Found while working on #4142 and will probably work on it in the coming weeks.

Steps to reproduce

  1. Go to the test code in test/integration/tests/3926-ghci-with-sublibraries/files
  2. Run rm -rf .stack-work to start from a clean state
  3. Run stack ghci and see that it fails
  4. Run step 2 again
  5. Run stack build and then stack ghci and it succeeds

Expected

Both step 3 and 5 should succeed.

Actual

Only step 3 succeeded

Stack version

[files] λ stack --version
Version 1.8.0, Git revision bcbfb1e90d1470ed6b9748b79e1655c52fc65b88 (6034 commits) x86_64 hpack-0.28.2

Method of installation

Git clone

@mihaimaruseac mihaimaruseac self-assigned this Jul 11, 2018

mihaimaruseac added a commit that referenced this issue Jul 11, 2018

mattaudesse added a commit that referenced this issue Jul 14, 2018

@dbaynard dbaynard added this to the P0: Blocking release milestone Jul 18, 2018

@dbaynard

This comment has been minimized.

Contributor

dbaynard commented Jul 18, 2018

@mihaimaruseac it would be good to get this working or add a note to the docs, before the next release.

@mihaimaruseac

This comment has been minimized.

Contributor

mihaimaruseac commented Jul 18, 2018

I'm travelling at the moment, so won't be able to get it working, most likely. Will come back to this on Friday and do one or the other

@dbaynard

This comment has been minimized.

Contributor

dbaynard commented Jul 21, 2018

Related: #2790 (possibly a duplicate)

mihaimaruseac added a commit that referenced this issue Jul 28, 2018

Document that `stack ghci` works best only after `stack build`.
This documents the #2790 and #4148 bugs as we decided in #4177 to only
document this behavior for 1.8.1 release and solve them later.

mihaimaruseac added a commit that referenced this issue Jul 28, 2018

Document that `stack ghci` works best only after `stack build`.
This documents the #2790 and #4148 bugs as we decided in #4177 to only
document this behavior for 1.8.1 release and solve them later.
@mihaimaruseac

This comment has been minimized.

Contributor

mihaimaruseac commented Jul 28, 2018

Added documentation for this, will try solving it later when I get some time to dwell deep into the code.

@adamschoenemann

This comment has been minimized.

adamschoenemann commented Nov 21, 2018

I have this problem on 1.9.1 also (just fyi)

@dbaynard

This comment has been minimized.

Contributor

dbaynard commented Nov 21, 2018

It hasn't been fixed — just documented, for now.

@adamschoenemann

This comment has been minimized.

adamschoenemann commented Nov 22, 2018

Yeah, just wanted to bump this issue. Any idea why it's happening? I'd love to help but I'd need some pointers to have a chance (aside: why are there 'z's interspersed with the internal library name?).

@mihaimaruseac

This comment has been minimized.

Contributor

mihaimaruseac commented Nov 26, 2018

I'm sorry, didn't get a chance to look into this :( Probably I'll get a chance next week or the one after, after HCAR is released.

The z's are just a name mangling scheme.

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