snapframework / snap

Top-level package for the official Snap Framework libraries, includes the snaplets API as well as infrastructure for sessions, auth, and templates.
http://snapframework.com/
BSD 3-Clause "New" or "Revised" License
455 stars 68 forks source link

build failure: No instance for (MonadFail Snap) #210

Closed simonmichael closed 5 years ago

simonmichael commented 5 years ago
--  While building package snap-1.1.2.0 using:
      /home/simon/.stack/setup-exe-cache/i386-linux/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/i386-linux/Cabal-1.24.2.0 build --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/simon/src/darcsden/.stack-work/logs/snap-1.1.2.0.log

    Configuring snap-1.1.2.0...
    Building snap-1.1.2.0...
    Preprocessing library snap-1.1.2.0...
    [ 1 of 27] Compiling Snap.Snaplet.Session.SessionManager ( src/Snap/Snaplet/Session/SessionManager.hs, .stack-work/dist/i386-linux/Cabal-1.24.2.0/build/Snap/Snaplet/Session/SessionManager.o )
    [ 2 of 27] Compiling Snap.Snaplet.Session.SecureCookie ( src/Snap/Snaplet/Session/SecureCookie.hs, .stack-work/dist/i386-linux/Cabal-1.24.2.0/build/Snap/Snaplet/Session/SecureCookie.o )
    [ 3 of 27] Compiling Snap.Snaplet.Session.Common ( src/Snap/Snaplet/Session/Common.hs, .stack-work/dist/i386-linux/Cabal-1.24.2.0/build/Snap/Snaplet/Session/Common.o )
    [ 4 of 27] Compiling Snap.Snaplet.Internal.RST ( src/Snap/Snaplet/Internal/RST.hs, .stack-work/dist/i386-linux/Cabal-1.24.2.0/build/Snap/Snaplet/Internal/RST.o )
    [ 5 of 27] Compiling Snap.Snaplet.Internal.Lensed ( src/Snap/Snaplet/Internal/Lensed.hs, .stack-work/dist/i386-linux/Cabal-1.24.2.0/build/Snap/Snaplet/Internal/Lensed.o )
    [ 6 of 27] Compiling Snap.Snaplet.Internal.LensT ( src/Snap/Snaplet/Internal/LensT.hs, .stack-work/dist/i386-linux/Cabal-1.24.2.0/build/Snap/Snaplet/Internal/LensT.o )
    [ 7 of 27] Compiling Snap.Snaplet.Internal.Types ( src/Snap/Snaplet/Internal/Types.hs, .stack-work/dist/i386-linux/Cabal-1.24.2.0/build/Snap/Snaplet/Internal/Types.o )

    /tmp/stack11506/snap-1.1.2.0/src/Snap/Snaplet/Internal/Types.hs:281:14: error:
        • No instance for (MonadFail Snap)
            arising from the 'deriving' clause of a data type declaration
          Possible fix:
            use a standalone 'deriving instance' declaration,
              so you can specify the instance context yourself
        • When deriving the instance for (MonadFail (Handler b v))
mightybyte commented 5 years ago

What version of snap-core are you building against? The snap test suite and the hackage build matrix are both completely passing:

https://travis-ci.org/snapframework/snap https://matrix.hackage.haskell.org/#/package/snap

My best guess would be that stack is building it against an incompatible version of snap-core.

simonmichael commented 5 years ago

snap-core-1.0.2.1

mightybyte commented 5 years ago

@simonmichael I believe the issue on this end has been fixed by bumping the lower bound for snap-core on hackage. Not sure how that affects the stack build on your end. But at least the metadata is correct now. Thanks for pointing this out!