Skip to content
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

Fixing cookbooks #1411

Open
2 of 7 tasks
akhesaCaro opened this issue Apr 10, 2021 · 0 comments
Open
2 of 7 tasks

Fixing cookbooks #1411

akhesaCaro opened this issue Apr 10, 2021 · 0 comments

Comments

@akhesaCaro
Copy link
Contributor

akhesaCaro commented Apr 10, 2021

Some cookbooks have been commented because they didn't compile anymore with new versions of GHC or dependencies.

Cookbooks to fix

HTTPS

[1 of 1] Compiling Network.Wai.Handler.WarpTLS ( Network/Wai/Handler/WarpTLS.hs, dist/build/Network/Wai/Handler/WarpTLS.o )
cabal: Failed to build warp-tls-3.2.8 (which is required by exe:cookbook-https

Error:      Constructor Connection does not have the required strict field(s): connHTTP2
from cookbook-https-0.1). See the build log above for details.

     In the expression:
        Connection
          {connSendMany = TLS.sendData ctx . L.fromChunks,
           connSendAll = sendall, connSendFile = sendfile, connClose = close',
           connFree = freeBuffer writeBuf, connRecv = recv ref,
           connRecvBuf = recvBuf ref, connWriteBuffer = writeBuf,
           connBufferSize = bufferSize}
      In an equation for conn’:
          conn ctx writeBuf ref
            = Connection
                {connSendMany = TLS.sendData ctx . L.fromChunks,
                 connSendAll = sendall, connSendFile = sendfile, connClose = close',
                 connFree = freeBuffer writeBuf, connRecv = recv ref,
                 connRecvBuf = recvBuf ref, connWriteBuffer = writeBuf,
                 connBufferSize = bufferSize}
            where
                sendall = TLS.sendData ctx . L.fromChunks . return
                sendfile fid offset len hook headers
                  = readSendFile
                      writeBuf bufferSize sendall fid offset len hook headers
                close' = void (tryIO sendBye) `finally` TLS.contextClose ctx
                sendBye
                  = handleJust
                      (\ e -> guard (e == ConnectionClosedByPeer) >> return e)
                      (const (return ()))
                      (TLS.bye ctx)
                ....
      In an equation for httpOverTls’:
          httpOverTls (TLSSettings {..}) s bs0 params
            = do { recvN <- makePlainReceiveN s bs0;
                   ctx <- TLS.contextNew (backend recvN) params;
                   TLS.contextHookSetLogging ctx tlsLogging;
                   .... }
            where
                backend recvN
                  = TLS.Backend
                      {TLS.backendFlush = return (),
                       TLS.backendClose = gracefulClose s 5000,
                       TLS.backendSend = sendAll' s, TLS.backendRecv = recvN}
                sendAll' sock bs
                  = sendAll sock bs
                    `E.catch` \ (SomeException _) -> throwIO ConnectionClosedByPeer
                conn ctx writeBuf ref
                  = Connection
                      {connSendMany = TLS.sendData ctx . L.fromChunks,
                       connSendAll = sendall, connSendFile = sendfile, connClose = close',
                       connFree = freeBuffer writeBuf, connRecv = recv ref,
                       connRecvBuf = recvBuf ref, connWriteBuffer = writeBuf,
                       connBufferSize = bufferSize}
                  where
                      sendall = TLS.sendData ctx . L.fromChunks . return
                      sendfile fid offset len hook headers
                        = readSendFile
                            writeBuf bufferSize sendall fid offset len hook headers

hoist-server-with-context

With GHC 8.0.2 :

src/Servant/Auth/Server/Internal/ThrowAll.hs:5:48: error:
Error:     Module Servant does not export ServantErr
cabal: Failed to build servant-auth-server-0.1.0.1 (which is required by
exe:cookbook-hoist-server-with-context from
cookbook-hoist-server-with-context-0.0.1).

Error: Process completed with exit code 1.

servant-auth-server 0.4.4.0 or higher is compatible with this PR : https://github.com/haskell-servant/servant/pull/1131/files

servant-auth-server needs to be at least 0.4.4.0, but it has a constraint on servant that needs GHC 8.2.1. So both aren't compatible with GHC 8.0.2
--> This PR has dropped the compatibility with 8.0.2 , but why? haskell-servant/servant-auth@90d14b4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant