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

Work on Windows #87

Open
ndmitchell opened this issue May 4, 2018 · 6 comments
Open

Work on Windows #87

ndmitchell opened this issue May 4, 2018 · 6 comments

Comments

@ndmitchell
Copy link

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.

@judah
Copy link
Owner

judah commented May 7, 2018

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?

@ndmitchell
Copy link
Author

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.

@ndmitchell
Copy link
Author

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?

@judah
Copy link
Owner

judah commented May 8, 2018

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?

@ndmitchell
Copy link
Author

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.

judah added a commit that referenced this issue Aug 31, 2018
As pointed out by #87.  (However, Windows support is still not yet tested.)
judah added a commit that referenced this issue Aug 31, 2018
As pointed out by #87.  (However, Windows support is still not yet tested.)
judah added a commit that referenced this issue Aug 31, 2018
As pointed out by #87.  (However, Windows support is still not yet tested.)
@chreekat
Copy link

@ndmitchell fyi, new patch came in Sep 2018 that fixed your last comment (from May 2018)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants