From 4ab231c1d9dcaa6ad1a05c80aebf204a8a8a6b12 Mon Sep 17 00:00:00 2001 From: intractable Date: Fri, 17 Mar 2017 07:48:41 -0500 Subject: [PATCH] Update `proto3-suite` ref to `8db2ceb8c48a3f8dc2cbdc492d1e8cbaf8b62a15` (#10) * Update `proto3-suite` gitrev in `stack.yaml` to `8db2ceb8c48a3f8dc2cbdc492d1e8cbaf8b62a15` * Update `proto3-suite` gitrev in `nix/proto3-suite.nix` to `8db2ceb8c48a3f8dc2cbdc492d1e8cbaf8b62a15` * Regenerate `Echo.hs` via new `proto3-suite` + `compile-proto-file` * Remove additional warnings --- examples/echo/echo-hs/Echo.hs | 2 ++ nix/proto3-suite.nix | 4 ++-- src/Network/GRPC/LowLevel/Client.hs | 8 ++++---- src/Network/GRPC/LowLevel/Server.hs | 10 ++++------ stack.yaml | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/echo/echo-hs/Echo.hs b/examples/echo/echo-hs/Echo.hs index bf34948..37e178a 100644 --- a/examples/echo/echo-hs/Echo.hs +++ b/examples/echo/echo-hs/Echo.hs @@ -2,6 +2,8 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing #-} -- | Generated by Haskell protocol buffer compiler. DO NOT EDIT! module Echo where import qualified Prelude as Hs diff --git a/nix/proto3-suite.nix b/nix/proto3-suite.nix index 374f789..c8a1560 100644 --- a/nix/proto3-suite.nix +++ b/nix/proto3-suite.nix @@ -8,8 +8,8 @@ mkDerivation { version = "0.1.0.0"; src = fetchgit { url = "https://github.com/awakenetworks/proto3-suite.git"; - sha256 = "0wvr54x3v6g9yb30nd5g9gfnn7j8is2hl8drwmmiyz0n45zlz0qh"; - rev = "827af4bf644d05e88b5d95dfe40febe7b43fab16"; + sha256 = "1g6w4ddqybgwnj3143bkl7sp9f5ch6d8qpb242fi4m396585bpq9"; + rev = "8db2ceb8c48a3f8dc2cbdc492d1e8cbaf8b62a15"; }; libraryHaskellDepends = [ base bytestring cereal containers deepseq filepath haskell-src mtl diff --git a/src/Network/GRPC/LowLevel/Client.hs b/src/Network/GRPC/LowLevel/Client.hs index 8bde6ff..a2d0969 100644 --- a/src/Network/GRPC/LowLevel/Client.hs +++ b/src/Network/GRPC/LowLevel/Client.hs @@ -264,10 +264,10 @@ clientReader cl@Client{ clientCQ = cq } rm tm body initMeta f = withClientCall cl rm tm go where go (unsafeCC -> c) = runExceptT $ do - runOps' c cq [ OpSendInitialMetadata initMeta - , OpSendMessage body - , OpSendCloseFromClient - ] + void $ runOps' c cq [ OpSendInitialMetadata initMeta + , OpSendMessage body + , OpSendCloseFromClient + ] srvMD <- recvInitialMetadata c cq liftIO $ f srvMD (streamRecvPrim c cq) recvStatusOnClient c cq diff --git a/src/Network/GRPC/LowLevel/Server.hs b/src/Network/GRPC/LowLevel/Server.hs index c0dacbd..5d49212 100644 --- a/src/Network/GRPC/LowLevel/Server.hs +++ b/src/Network/GRPC/LowLevel/Server.hs @@ -373,12 +373,10 @@ serverReader' :: Server serverReader' _ sc@ServerCall{ unsafeSC = c, callCQ = ccq } initMeta f = runExceptT $ do (mmsg, trailMeta, st, ds) <- liftIO $ f sc (streamRecvPrim c ccq) - runOps' c ccq ( OpSendInitialMetadata initMeta - : OpSendStatusFromServer trailMeta st ds - : maybe [] ((:[]) . OpSendMessage) mmsg - ) - return () - + void $ runOps' c ccq ( OpSendInitialMetadata initMeta + : OpSendStatusFromServer trailMeta st ds + : maybe [] ((:[]) . OpSendMessage) mmsg + ) -------------------------------------------------------------------------------- -- serverWriter (server side of server streaming mode) diff --git a/stack.yaml b/stack.yaml index 177fc01..05b79ca 100644 --- a/stack.yaml +++ b/stack.yaml @@ -9,7 +9,7 @@ packages: - '.' - location: git: git@github.com:awakenetworks/proto3-suite.git - commit: 827af4bf644d05e88b5d95dfe40febe7b43fab16 + commit: 8db2ceb8c48a3f8dc2cbdc492d1e8cbaf8b62a15 extra-dep: true - location: git: git@github.com:awakenetworks/proto3-wire.git