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

Doesn't work on Windows #216

Closed
ndmitchell opened this Issue Jun 9, 2015 · 22 comments

Comments

Projects
None yet
4 participants
@ndmitchell
Contributor

ndmitchell commented Jun 9, 2015

C:\Neil\hlint>stack build
Downloading lts-2.13 build plan ...
Downloaded lts-2.13 build plan.
Populating index cache, may take a moment ...
Updating package index hackage.haskell.org ...
Cloning package index ...
Done populating index cache.
Checking against build plan lts-2.13
Writing default config file to: C:\Neil\hlint\stack.yaml
Downloading ghc-7.8.4 ...
Downloaded ghc-7.8.4.
InvalidUrlException "7z" "Invalid URL"

C:\Neil\hlint>ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.3

So it tries to download GHC 7.8.4, even though I have 7.8.3 installed (which seems like a bug). It also fails to do that.

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 9, 2015

What does stack --version say?

@ndmitchell

This comment has been minimized.

Contributor

ndmitchell commented Jun 9, 2015

C:\Neil\hlint>stack --version
Version 0.0.0, Git revision 6bf1ba3a7a3fdf92fa4af2ccb148ee2004dd607a (dirty)

I'm using the version from https://github.com/commercialhaskell/stack/wiki/Downloads#windows

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 9, 2015

Ouch, OK, testing now

@snoyberg snoyberg added this to the Second release milestone Jun 9, 2015

@snoyberg snoyberg self-assigned this Jun 9, 2015

@snoyberg snoyberg added the type: bug label Jun 9, 2015

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 9, 2015

Downloading 7.8.4 is intentional: it requires at least the tested version of GHC from the snapshot, and that LTS snapshot was built with 7.8.4. I haven't reproed that problem yet, still trying

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 9, 2015

OK, reproed, now fixing

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 9, 2015

Found the bug, slipped in after my testing:

d9f2f66#diff-4968f87e674615592e572f2ec593e5b0L550

snoyberg added a commit that referenced this issue Jun 9, 2015

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 9, 2015

OK, pushed a fix for it. I'm just rebuilding everything locally and then I'll upload a new executable.

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 9, 2015

@ndmitchell I've uploaded a new binary, can you confirm that this works? Everything is running correctly for me.

@snoyberg snoyberg assigned ndmitchell and unassigned snoyberg Jun 9, 2015

@snoyberg snoyberg modified the milestones: Third release, Second release Jun 9, 2015

@ndmitchell

This comment has been minimized.

Contributor

ndmitchell commented Jun 9, 2015

Still doesn't work:

C:\Users\NDMIT_~1\AppData\Local\Temp\stack2856\happy-1.19.5\dist: MoveFileEx "C:
\\Users\\NDMIT_~1\\AppData\\Local\\Temp\\stack2856\\happy-1.19.5\\dist" "C:\\Use
rs\\NDMIT_~1\\AppData\\Local\\Temp\\stack2856\\happy-1.19.5\\dist-stack\\i386-wi
ndows\\Cabal-1.18.1.5\\": permission denied (Access is denied.)
@ndmitchell

This comment has been minimized.

Contributor

ndmitchell commented Jun 9, 2015

In particular, C:\\Users\\NDMIT_~1\\AppData\\Local\\Temp\stack2856 doesn't exist, but I don't know if that was because stack cleaned it up on exception.

@ndmitchell

This comment has been minimized.

Contributor

ndmitchell commented Jun 9, 2015

I confirm this happens repeatably.

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 9, 2015

Different issue: this only applies to happy, because of the terrible workaround it requires to build. The dist directory needs to get renamed. Testing if this is still Windows-only before fixing.

@ndmitchell

This comment has been minimized.

Contributor

ndmitchell commented Jun 9, 2015

Why is it building happy anyway? I have it installed and on my PATH. Or does it require happy build with its GHC?

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 9, 2015

It builds the version of happy in the snapshot to be on the safe side. It's also to do with the fact that build-tools fields in .cabal files are undefined, and may refer to either an executable or a package, so the fact that you have happy.exe available doesn't prove that you have the right build tool... it's quite a mess actually. Anyway, there's an easy fix I'll push immediately, and then a better one to be worked out.

@ndmitchell

This comment has been minimized.

Contributor

ndmitchell commented Jun 9, 2015

It's a mess, which is why I want to use stack in the first place :)

snoyberg added a commit that referenced this issue Jun 9, 2015

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 9, 2015

Hah, true. OK, can you pull master and see if that lets you build hlint? It seems to be working for me now.

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 9, 2015

And I'm wondering if this should be opened as a bug against directory, since the behavior on Windows and Linux is difference for renameDirectory. That might just be an inherent OS difference though.

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 9, 2015

Turns out that this is a documented difference in renameDirectory:

On Win32 platforms, renameDirectory fails if the new directory already exists.

Anyway, the fix in place is the correct one (use Path.parent which is aware of the trailing-slash issue). takeDirectory was following it's documented behavior, which happens to not work well with Path's way of doing directories.

@ndmitchell

This comment has been minimized.

Contributor

ndmitchell commented Jun 9, 2015

OK, with the git version it all worked.

@ndmitchell ndmitchell closed this Jun 9, 2015

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 9, 2015

W00t. Thanks again for catching these, I'll add "build hlint" to the release checklist, and make sure that there aren't more commits added after we've gone through the checklist next time.

@Timp-ELS

This comment has been minimized.

Timp-ELS commented Oct 18, 2018

Hi, this seems to have resurfaced:

Everything is Ok

Folders: 520
Files: 11779
Size: 2080675659
Compressed: 2090035200
C:\Users\pizeyt\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3-tmp23292\ghc-8.4.3: renamePath:MoveFileEx "C:\Users\pizeyt\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3-tmp23292\ghc-8.4.3\" "C:\Users\pizeyt\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\": permission denied (Access is denied.)

@dbaynard

This comment has been minimized.

Contributor

dbaynard commented Oct 18, 2018

@Timp-ELS Which stack version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment