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

luna-package fails to compile on Windows #276

Closed
mwu-tow opened this issue Sep 5, 2018 · 1 comment
Closed

luna-package fails to compile on Windows #276

mwu-tow opened this issue Sep 5, 2018 · 1 comment
Assignees
Labels
p-highest Should be completed ASAP

Comments

@mwu-tow
Copy link
Contributor

mwu-tow commented Sep 5, 2018

General Summary

luna-package fails to build on Windows.
Specifically this: https://github.com/luna/luna/blob/master/package/src/Luna/Package.hs#L278 :
Path.mkAbsDir "/" is not legal on Windows, as / is not a valid absolute path.
http://hackage.haskell.org/package/path-0.6.1/docs/Path.html#v:mkAbsDir says that

due to the nature of absolute paths this (e.g. /home/foo) may compile on your platform, but it may not compile on another platform (Windows).

Steps to Reproduce

Run stack build on the repo on Windows system.

Expected Result

Compilation suceeds.

Actual Result

Compilation fails:

�[0mluna-package-0.2: build (lib)�[0m
Progress 1/2

--  While building custom Setup.hs for package luna-package-0.2 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.2.0.1_ghc-8.4.2.exe --builddir=.stack-work\dist\7d103d30 build lib:luna-package --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
    Logs have been written to: F:\dev\luna\.stack-work\logs\luna-package-0.2.log

    Preprocessing library for luna-package-0.2..
    Building library for luna-package-0.2..
    [ 7 of 11] Compiling Luna.Package     ( src\Luna\Package.hs, .stack-work\dist\7d103d30\build\Luna\Package.o )

    �[;1msrc\Luna\Package.hs:278:32: �[;1m�[31merror:�[0m�[0m�[;1m�[0m�[0m�[;1m
        ? Exception when trying to run compile-time code:
            InvalidAbsDir "/"
    CallStack (from HasCallStack):
      error, called at src\\Path.hs:536:17 in path-0.6.1-1tx1iSEHmt775kax6VnlPP:Path
          Code: Path.mkAbsDir "/"
        ? In the untyped splice: $(Path.mkAbsDir "/")�[0m�[0m
    �[;1m�[34m    |�[0m�[0m
    �[;1m�[34m278 |�[0m�[0m     srcPackageRoot <- fromJust �[;1m�[31m$(Path.mkAbsDir "/")�[0m�[0m <$> findPackageRoot src
    �[;1m�[34m    |�[0m�[0m�[;1m�[31m                                ^^^^^^^^^^^^^^^^^^^^�[0m�[0m
    �[0m�[0m�[0m

Luna Version

n/a

@mwu-tow mwu-tow added D - Core Contributor p-highest Should be completed ASAP labels Sep 5, 2018
@iamrecursion iamrecursion self-assigned this Sep 5, 2018
@iamrecursion
Copy link
Contributor

See #277.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p-highest Should be completed ASAP
Projects
None yet
Development

No branches or pull requests

2 participants