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

Comments

Projects
None yet
2 participants
@VitorCBSB

VitorCBSB commented Nov 22, 2015

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 mgsloan added the type: bug label Nov 23, 2015

mgsloan added a commit that referenced this issue Nov 23, 2015

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Nov 23, 2015

Good catch, thanks! Fixed in 0c5b396

@mgsloan mgsloan closed this Nov 23, 2015

@VitorCBSB

This comment has been minimized.

VitorCBSB commented Nov 24, 2015

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 added a commit that referenced this issue Nov 25, 2015

@mgsloan

This comment has been minimized.

Collaborator

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