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
run repl
loading extra modules but not their dependencies
#471
Comments
I've attempted to reproduce this by modifying existing tests in this repository, but I haven't been able to. Please let me know if I'm not testing what you had intended. I changed four files, like so: ➡️
➡️ import Lib (value)
main = print value ➡️
➡️ {-# LANGUAGE NoImplicitPrelude #-}
module Lib
( value
) where
import Data.Text (Text, pack)
value :: Text
value = pack "a string" With all of these changes, I ran:
The shell started up as expected, there were no errors. Then, I used
|
OK I have a reproduction of the issue. There are three haskell sources. -- rh_ghci_bug_a/src/A/A.hs
module A.A ( a ) where
a :: ()
a = () -- rh_ghci_bug_bc/src/BC/B.hs
module BC.B ( b ) where
import A.A ( a )
b :: ()
b = a -- rh_ghci_bug_bc/src/BC/C.hs
module BC.C ( c ) where
import BC.B ( b )
c :: ()
c = b and two build files
the directory structure is:
so
I think the root cause is that ghci is loading |
@aherrmann did your commit above solve this problem? |
@Profpatsch Yes, I think so. On current master this is part of the test suite and can be verified with
|
If I
bazel run //:b-repl
and//:b
depends on//:a
, ghci seems to load all the modules in//:a
and//:b
, but only the depencies of//:b
. This then fails when it loads a module from//:a
because it's missing some dependency of//:a
that is not a dependency of//:b
.The text was updated successfully, but these errors were encountered: