Skip to content

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

@VitorCBSB

Description

@VitorCBSB

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions