-
Notifications
You must be signed in to change notification settings - Fork 841
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
hs-source-dirs starting with ../
are not included in the -i<dir> arguments when using stack ghci file.hs
#2895
Comments
Hmm, I cannot reproduce the issue. For me if I have
It works ( |
I put up a reproducing repo here |
tallen-imvu
added a commit
to tallen-imvu/stack
that referenced
this issue
Jan 13, 2017
Oh, there it is. |
mgsloan
added a commit
that referenced
this issue
Jan 31, 2017
for 'stack ghci', don't omit hsSourceDirs that have '..' in them. #2895
Thanks for finding and fixing!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
stack ghci <target file>
will correctly determine include directories using the cabal file's hs-source-dirs property unless the source directory starts with a../
stack build
however deals with this correctly.Steps to reproduce
add a relative path to hs-source-dirs:
ex:
hs-source-dirs: . ../extra
Add a module to the ../extra directory and import it in your main file
run command
stack build
everything should work
run command
stack ghci <path to main>
Expected
ghci launched with package loaded
Actual
Error in compiling due to failing to load the extra module. Because it cannot find it.
running the
stack ghci
command with--version
shows that the../extra
directory is not being added to the list of-i<directory>
flags passed to ghci.If the module is moved to a directory that does not require a
../
prefix, then that directory is included properly.Stack version
Method of installation
The text was updated successfully, but these errors were encountered: