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

stack ghci fails to load modules with spaces in path. #1401

Closed
VitorCBSB opened this issue Nov 22, 2015 · 3 comments
Closed

stack ghci fails to load modules with spaces in path. #1401

VitorCBSB opened this issue Nov 22, 2015 · 3 comments

Comments

@VitorCBSB
Copy link

Windows 10.

C:\Users\Vitor Coimbra\img2ascii>stack --version
Version 0.1.8.0, Git revision 52bb19764e20a4433f3f8c65e4093d2a51568c00 (2602 commits) x86_64

Hey there, while playing around with stack, I noticed the command stack ghci does not load files with spaces in their paths.

For example, the module C:\Users\Vitor Coimbra\img2ascii\src\Main.hs fails to load with the following messages:

C:\Users\Vitor Coimbra\img2ascii>stack ghci
Setting codepage to UTF-8 (65001) to ensure correct output from GHC
Using main module: Package `img2ascii' component exe:img2ascii with main-is file: C:\Users\Vitor Coimbra\img2ascii\src\Main.hs
Configuring GHCi with the following packages: img2ascii
GHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help
ghc.exe: warning: _tzset from msvcrt is linked instead of __imp__tzset
target `C:\Users\Vitor' is not a module name or a source file
syntax:  :module [+/-] [*]M1 ... [*]Mn
Prelude>

and so, none of the functions in Main are available in the interpreter. Once again, I don't know if I missed some obvious step, but I can reproduce it by doing:

(Starts in the C:\Users\Vitor Coimbra directory)

stack new Test simple
cd Test
stack build
stack ghci
@mgsloan mgsloan added this to the P1: Must milestone Nov 23, 2015
@mgsloan
Copy link
Contributor

mgsloan commented Nov 23, 2015

Good catch, thanks! Fixed in 0c5b396

@mgsloan mgsloan closed this as completed Nov 23, 2015
@VitorCBSB
Copy link
Author

Hey, thanks for fixing it. Works great!

The only thing I'm worried about is the syntax message is still there. I don't know if it's something I need to be worried about or not, but here it is.

C:\Users\Vitor Coimbra\img2ascii>stack --version
Version 0.1.9.0, Git revision cec298802573296f27eb0b0b09ed153e16766519 (2658 commits) x86_64

C:\Users\Vitor Coimbra\img2ascii>stack ghci
Using main module: Package `img2ascii' component exe:img2ascii with main-is file: C:\Users\Vitor Coimbra\img2ascii\src\Main.hs
Configuring GHCi with the following packages: img2ascii
GHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help
ghc.exe: warning: _tzset from msvcrt is linked instead of __imp__tzset
[1 of 1] Compiling Main             ( C:\Users\Vitor Coimbra\img2ascii\src\Main.hs, interpreted )
Ok, modules loaded: Main.
syntax:  :module [+/-] [*]M1 ... [*]Mn
*Main>

@mgsloan
Copy link
Contributor

mgsloan commented Nov 25, 2015

Good point, thanks for following up with that concern. Fixed in 45a2f5d

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

2 participants