-
Notifications
You must be signed in to change notification settings - Fork 841
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
Stack setup fails for ghcjs project on windows #1774
Comments
Fix withUnpackedTarball7z to find name of srcDir after unpacking #1774
Doh! Thanks for finding and fixing this :D |
Unfortunately, the bug seems to have sneaked in again with version 1.6.3:
# stack.yaml
resolver: lts-6.20
compiler: ghcjs-0.2.0.9006020_ghc-7.10.3
compiler-check: match-exact
packages:
- '.'
extra-deps: []
setup-info:
ghcjs:
source:
ghcjs-0.2.0.9006020_ghc-7.10.3:
url: http://ghcjs.tolysz.org/lts-6.20-9006020.tar.gz
sha1: a6cea90cd8121eee3afb201183c6e9bd6bacd94a The steps to reproduce are exactly the same as above, the whole error-message reads:
The exception is thrown from this line https://github.com/commercialhaskell/stack/blob/v1.6.3/src/Stack/Setup.hs#L1416 |
@RaoulSchaffranek Huh, that's curious. Perhaps it's an issue with that particular tarball. Setup.hs hasn't changed much recently. Only thing that's GHCJS related is bc9007a and that's a change for booting which comes after installing from the tarball. |
I tried several other tarballs and it remains the same story. After running
Where the directories |
Curious! Things changed here - #3212 - but I verified with a windows user that the change works. Can you please try without that change to see if that's the culprit? I don't currently have access to a windows setup. Extra awesome bonus points would be to open a PR with a fix! |
I'm able to get it working on my fresh Windows 10 installation by easing the expectation for the single unpacked directory in I can make a pull request if that suits you. expectSingleUnpackedDir :: (MonadIO m, MonadThrow m) => Path Abs File -> Path Abs Dir -> m (Path Abs Dir)
expectSingleUnpackedDir archiveFile destDir = do
contents <- listDir destDir
case contents of
([dir], _ ) -> return dir
_ -> throwString $ "Expected a single directory within unpacked " ++ toFilePath archiveFile |
@dwaldhalm Sure, a PR would be appreciated, thanks! |
it also happened to me when using this ghcjs compiler can i just change to |
@Rizary I don't think @dwaldhalm 's fix has been included in a released version of stack yet. You can do Closing this issue, hopefully it is solved by that fix. If not, feel free to re-open or request it be reopened. |
Happening to me, just installing Stack and trying to follow the instructions at https://docs.haskellstack.org/en/stable/ghcjs/. Any workaround I can do?
|
stack setup
fails when executed in a project setup for ghcjs like this:The error is
Expected a single directory within unpacked ...
, and happens on windows.Steps to reproduce
stack setup
Expected:
Stack sets up ghcjs
Actual
Stack fails with
Expected a single directory within unpacked ...
Whole output:
Output of
stack --version
:I attached the output of
stack setup --verbose
The text was updated successfully, but these errors were encountered: