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

'new-exec ghc -- --interactive' behaves different than 'new-exec ghci' #5621

Open
hasufell opened this issue Oct 15, 2018 · 3 comments
Open

Comments

@hasufell
Copy link
Member

Setup:

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.4.4

So current ghc in PATH is 8.4.4.

Project config is set to ghc-8.4.3

Invoking new-exec ghc -- --interactive in the project dir will start ghci-8.4.3 with the 8.4.3 environment file.

Invoking new-exec ghci will try to start ghci-8.4.4 with the 8.4.3 environment file, which fails straight.

These two should do the same, imo.

@fgaz
Copy link
Member

fgaz commented Oct 20, 2018

The problem is probably here:

let programDb = modifyProgramSearchPath
(map ProgramSearchPathDir extraPaths ++)
. pkgConfigCompilerProgs
. elaboratedShared
$ buildCtx

pkgConfigCompilerProgs does not include ghci (?)

@hvr
Copy link
Member

hvr commented Oct 21, 2018

@fgaz btw, the suggested fix is to add sugar for cabal new-exec ghci to not invoke ghci (because cabal never does does invoke ghci, nor does it need to). Instead, the consistent way to fix/workaround this in a way consistent w/ cabal new-repl (which does not invoke ghci either) is to desugar cabal new-exec ghci into cabal new-exec ghc --interactive

@jneira
Copy link
Member

jneira commented Jun 12, 2021

maybe I missing something but there is a plan to fix the bug and it does not sound hard

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

No branches or pull requests

4 participants