Work on Windows
Opened this issue · 6 comments
Currently pier
depends on unix
. It seems that the reason is to use symlinks? The latest directory
package has https://hackage.haskell.org/package/directory-1.3.2.2/docs/System-Directory.html#v:createDirectoryLink, which might give you a portable way of doing that.
Thanks for the suggestion! I've pushed 6c8c273 which removes the unix
dependency on Windows. (It still keeps it for non-Windows since a new enough version of directory
isn't available in a Stackage LTS yet.)
I don't currently have access to a Windows machine for testing, though. Could you confirm whether or not the latest master
works for you?
Any reason for not just going for nightly? People think lts has magically properties - it doesn't - it's just a buggy version of nightly. http://neilmitchell.blogspot.co.uk/2015/12/whats-point-of-stackage-lts.html
Will test it out later. Generally I suggest using Appveyor which will keep it working.
I'm getting errors all over the place, e.g.:
src\Pier\Build\Executable.hs:9:2: error:
lexical error at character 'i'
|
9 | #if !MIN_VERSION_base(4,11,0)
| ^
Seems like you need a lot of {-# LANGUAGE CPP #-}
extensions?
Strange, it passes in CI and has CPP
set globally now:
https://github.com/judah/pier/blob/master/package.yaml#L21
Maybe pier.cabal
wasn't regenerated by stack
? Can you try deleting that file and re-running stack build
?
Your guess was correct.
C:\Neil\pier>pier build pier
Downloading lts-10.3.yaml
Downloading stack-setup-2.yaml
Error when running Shake build system:
* Library pier
* GHC StackageGhc, version 8.2.2, built-in packages containers, ghc-prim, ghc-boot, ghci, template-haskell, terminfo, ghc-boot-th, binary, deepseq, base, filepath, hpc, ghc, rts, unix, hoopl, array, process, pretty, transformers, bytestring, directory, integer-gmp, time
* Download "stack-setup-2.yaml" from "https://raw.githubusercontent.com/fpco/stackage-content/master/stack" into "stackage/setup"
Unable to download "https://raw.githubusercontent.com/fpco/stackage-content/master/stack\\stack-setup-2.yaml"
Status: 404 Not Found
CallStack (from HasCallStack):
error, called at src\\Pier\\Core\\Download.hs:73:31 in pier-0.1.0.0-EjHH5CVmHFJ2HvlUpWrxEz:Pier.Core.DownloadC:\Neil\pier>pier build pier
Downloading lts-10.3.yaml
Downloading stack-setup-2.yaml
Error when running Shake build system:
* Library pier
* GHC StackageGhc, version 8.2.2, built-in packages containers, ghc-prim, ghc-boot, ghci, template-haskell, terminfo, ghc-boot-th, binary, deepseq, base, filepath, hpc, ghc, rts, unix, hoopl, array, process, pretty, transformers, bytestring, directory, integer-gmp, time
* Download "stack-setup-2.yaml" from "https://raw.githubusercontent.com/fpco/stackage-content/master/stack" into "stackage/setup"
Unable to download "https://raw.githubusercontent.com/fpco/stackage-content/master/stack\\stack-setup-2.yaml"
Status: 404 Not Found
CallStack (from HasCallStack):
error, called at src\\Pier\\Core\\Download.hs:73:31 in pier-0.1.0.0-EjHH5CVmHFJ2HvlUpWrxEz:Pier.Core.Download
Looks like you're using </>
for URL construction? Should use ++ "/" ++
explicitly.
@ndmitchell fyi, new patch came in Sep 2018 that fixed your last comment (from May 2018)