Problems with custom snapshots

15 views
Skip to first unread message

Mark Fine

unread,
Dec 7, 2017, 8:41:10 PM12/7/17
to haskell-stack
Thanks for 1.6.1! I'm super excited about using custom snapshots, but ran into some issues with a couple of projects with particular dependencies not being handled properly. I took a working project and wrapped the lts resolver in a custom snapshot with nothing else:

--- a/stack-lts-6.yaml
+++ b/stack-lts-6.yaml
@@ -1,4 +1,4 @@
-resolver: lts-6.35
 packages:
 - .

where minimal-snapshot-lts-6.yaml contains:

resolver: lts-6.35
name: snapshot-lts-6

This trips up the build consistently on a couple of packages (http2, vector-algorithms):

--  While building custom Setup.hs for package http2-1.6.2 using:
      /home/travis/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_1.22.5.0_ghc-7.10.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 configure --with-ghc=/home/travis/.stack/programs/x86_64-linux/ghc-7.10.3/bin/ghc --with-ghc-pkg=/home/travis/.stack/programs/x86_64-linux/ghc-7.10.3/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/pkgdb --libdir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/lib --bindir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/bin --datadir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/share --libexecdir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/libexec --sysconfdir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/etc --docdir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/doc/http2-1.6.2 --htmldir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/doc/http2-1.6.2 --haddockdir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/doc/http2-1.6.2 --dependency=array=array-0.5.1.0-960bf9ae8875cc30355e086f8853a049 --dependency=base=base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d --dependency=bytestring=bytestring-0.10.6.0-9a873bcf33d6ce2fd2698ce69e2c1c66 --dependency=bytestring-builder=bytestring-builder-0.10.6.0.0-8aa4073730c676dbe210ea8bffd8d092 --dependency=case-insensitive=case-insensitive-1.2.0.10-2710882b4f658c001bb72a067083a3a8 --dependency=containers=containers-0.5.6.2-59326c33e30ec8f6afd574cbac625bbb --dependency=psqueues=psqueues-0.2.2.3-742bdf37b7dba2a5239a54cba5b43cc7 --dependency=stm=stm-2.4.4.1-7050c728ed5b2315e2c6b56d8bf9837f
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/travis/build/XXXXXX/.stack-work/logs/http2-1.6.2.log
    Configuring http2-1.6.2...
    Cabal-simple_mPHDZzAJ_1.22.5.0_ghc-7.10.3: At least the following dependencies
    are missing:
    aeson-pretty -any, hex -any
--  While building custom Setup.hs for package vector-algorithms-0.7.0.1 using:
      /home/travis/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_1.22.5.0_ghc-7.10.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 configure --with-ghc=/home/travis/.stack/programs/x86_64-linux/ghc-7.10.3/bin/ghc --with-ghc-pkg=/home/travis/.stack/programs/x86_64-linux/ghc-7.10.3/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/pkgdb --libdir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/lib --bindir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/bin --datadir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/share --libexecdir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/libexec --sysconfdir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/etc --docdir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/doc/vector-algorithms-0.7.0.1 --htmldir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/doc/vector-algorithms-0.7.0.1 --haddockdir=/home/travis/.stack/snapshots/x86_64-linux/custom-snapshot-lts-6-l7MQXbzRraUj/7.10.3/doc/vector-algorithms-0.7.0.1 --dependency=base=base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d --dependency=bytestring=bytestring-0.10.6.0-9a873bcf33d6ce2fd2698ce69e2c1c66 --dependency=primitive=primitive-0.6.1.0-b2a7b9f8d5591c0d4ce7ef238a3217d2 --dependency=vector=vector-0.11.0.0-299aefb173ce5a731565d31f609a0cfd
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/travis/build/XXXXXX/.stack-work/logs/vector-algorithms-0.7.0.1.log
    Configuring vector-algorithms-0.7.0.1...
    Cabal-simple_mPHDZzAJ_1.22.5.0_ghc-7.10.3: At least the following dependencies
    are missing:
    mwc-random -any

Is there something I can do to help troubleshoot the issue here? Or alleviate it? Unfortuantely, still on lts-6 until lts-10 comes out. Thanks for any help figuring out this issue!

Mark

Michael Snoyman

unread,
Dec 8, 2017, 1:13:09 AM12/8/17
to Mark Fine, haskell-stack
I know this bug :(. It's an old Cabal bug, where build-depends for non-buildable components are still required. When dealing with older Cabal libraries, we need to make sure those libraries are available, even though they aren't needed. This isn't custom snapshot specific, you can reproduce by wiping out the package database for lts-6.35 and running:

    $ stack build vector-algorithms  --resolver lts-6.35


Can you open an issue on the tracker for this? We should work around this to keep compatibility with old Cabal versions. As far as workarounds, there are two:

1. As you imply: updating to a newer LTS which includes a Cabal version with the bug fix will work around this
2. Manually install the missing packages: stack build mwc-random aeson-pretty hex

--
You received this message because you are subscribed to the Google Groups "haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-stack+unsubscribe@googlegroups.com.
To post to this group, send email to haskel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/haskell-stack/CANRZ_fnnZz1kyxRUj6Ln48VDb3VseyW-c90pfApVNnK-jvYVrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Michael Snoyman

unread,
Dec 8, 2017, 2:01:02 AM12/8/17
to Mark Fine, haskell-stack

Mark Fine

unread,
Dec 8, 2017, 4:17:02 PM12/8/17
to Michael Snoyman, haskell-stack
Thanks Michael!

I was able to workaround the issue by installing the dependencies independently. These custom snapshots are great!

Mark

Michael Snoyman

unread,
Dec 9, 2017, 4:21:51 PM12/9/17
to Mark Fine, haskell-stack
Awesome, glad to hear it's working.
Reply all
Reply to author
Forward
0 new messages