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

cabal-dev ghci error #107

Open
jaccokrijnen opened this issue Jul 22, 2013 · 1 comment
Open

cabal-dev ghci error #107

jaccokrijnen opened this issue Jul 22, 2013 · 1 comment

Comments

@jaccokrijnen
Copy link

When running cabal-dev ghci on a cabal library project that has no source code (or does not export any modules) the following error message appears:

$cabal-dev ghci
FAILED:
Failed to extract GHC Build arguments
--------------------------------------------------------------
...

To me this message was not very helpful (keep in mind that I am completely new to cabal and cabal-dev). Also, running the normal ghci command would work, which almost convinced me there would be something wrong with cabal-dev. Obviously, this should not happen to more experienced cabal users, but I was stuck at this point, google did not help either.

Could the error message perhaps be a bit more informative?

Kind regards,
Jacco

@creswick
Copy link
Owner

Ah, that's a good point, and a situation we don't run into often.

The reason this happens (as far as I know...) is because we're using a hack to get the ghc arguments that cabal uses to do a build. Basically, we can configure cabal to use sandboxes more easily than we can configure ghc -- and cabal already does that, so we cheat and tell cabal to invoke a different ghc (which we built) just to get the arguments to pass to ghci.

However, cabal doesn't bother invoking ghc if there is no source, or if there are no exposed modules, so this hack fails with the cryptic parse error you've seen.

Since the hack fails, it's hard for us to recover and "do the right thing" (that's also a little hard to define, but it seems like it should load ghci with the package dependencies in the sandbox, at least).

Clearly, the error message leaves something to be desired, and we can probably fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants