General summary/comments (optional)
I was trying to use an intermediate commit of Stack as a dependency in a stack2nix branch adding compatibility with the upcoming version but failed doing so
Steps to reproduce
- Add the following into
stack.yaml:
extra-deps:
- cabal2nix-2.14.1
- github: commercialhaskell/stack
commit: 7a076ab3a79abfe9a65410891b42938825feb96e
subdirs:
- http-download
- pantry
- rio-prettyprint
- .
- Run command
stack build.
Expected
Stack checks out Stack sources and builds project.
Actual
Build fails with
$ stack build
Archive extraction failed. Tarballs and zip archives are supported, couldn't handle the following URL, https://github.com/commercialhaskell/stack/archive/7a076ab3a79abfe9a65410891b42938825feb96e.tar.gz downloaded to the file xclccHWY2xDl.http-archive
It looks like Stack doesn't deal with symlinks in Stack's repo as I see the following in verbose log:
2019-02-11 15:02:40.407947: [debug] Trying to ungzip/untar /home/qrilka/ws/iohk/stack2nix/.stack-work/downloaded/xclccHWY2xDl.http-archive
2019-02-11 15:02:40.414226: [debug] Got exception: Invalid file name in tar archive: "../CONTRIBUTING.md"
2019-02-11 15:02:40.414282: [debug] Trying to unzip /home/qrilka/ws/iohk/stack2nix/.stack-work/downloaded/xclccHWY2xDl.http-archive
2019-02-11 15:02:40.414339: [debug] Got exception: Data.Binary.Get.runGet at position 4: Did not find end of central directory signature
CallStack (from HasCallStack):
error, called at libraries/binary/src/Data/Binary/Get.hs:351:5 in binary-0.8.6.0:Data.Binary.Get
2019-02-11 15:02:40.414395: [debug] Trying to untar (no ungzip) /home/qrilka/ws/iohk/stack2nix/.stack-work/downloaded/xclccHWY2xDl.http-archive
2019-02-11 15:02:40.414435: [debug] Got exception: NotTarFormat
Archive extraction failed. Tarballs and zip archives are supported, couldn't handle the following URL, https://github.com/commercialhaskell/stack/archive/7a076ab3a79abfe9a65410891b42938825feb96e.tar.gz downloaded to the file xclccHWY2xDl.http-archive
Stack version
$ stack --numeric-version
1.9.3
Method of installation
gentoo-haskell
General summary/comments (optional)
I was trying to use an intermediate commit of Stack as a dependency in a
stack2nixbranch adding compatibility with the upcoming version but failed doing soSteps to reproduce
stack.yaml:stack build.Expected
Stack checks out Stack sources and builds project.
Actual
Build fails with
It looks like Stack doesn't deal with symlinks in Stack's repo as I see the following in verbose log:
Stack version
Method of installation
gentoo-haskell