mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-11-14 15:19:43 +01:00
Switch from protobuf-wire
to proto3-suite
(#92)
`protobuf-wire` was open sourced as `proto3-suite` (with a corresponding module rename) so this change updates the dependency and import lists
This commit is contained in:
parent
6888394dfa
commit
bff8fb7c7e
14 changed files with 36 additions and 36 deletions
|
@ -11,14 +11,14 @@ import Control.Monad
|
|||
import Criterion.Main
|
||||
import Criterion.Types (Config (..))
|
||||
import qualified Data.ByteString.Lazy as BL
|
||||
import Data.Protobuf.Wire.Class
|
||||
import Data.Protobuf.Wire.Types
|
||||
import Data.Word
|
||||
import GHC.Generics (Generic)
|
||||
import Network.GRPC.HighLevel.Server hiding (serverLoop)
|
||||
import Network.GRPC.HighLevel.Server.Unregistered (serverLoop)
|
||||
import Network.GRPC.LowLevel
|
||||
import Network.GRPC.LowLevel.GRPC (threadDelaySecs)
|
||||
import Proto3.Suite.Class
|
||||
import Proto3.Suite.Types
|
||||
import System.Random (randomRIO)
|
||||
|
||||
data AddRequest = AddRequest {addX :: Fixed Word32
|
||||
|
|
15
default.nix
15
default.nix
|
@ -1,6 +1,6 @@
|
|||
{ mkDerivation, async, base, bytestring, c2hs, clock, containers
|
||||
, grpc, managed, optparse-generic, pipes, proto3-wire
|
||||
, protobuf-wire, QuickCheck, random, safe, sorted-list, stdenv, stm
|
||||
, grpc, managed, optparse-generic, pipes, proto3-suite, proto3-wire
|
||||
, QuickCheck, random, safe, sorted-list, stdenv, stm
|
||||
, system-filepath, tasty, tasty-hunit, tasty-quickcheck, text, time
|
||||
, transformers, turtle, unix, vector
|
||||
}:
|
||||
|
@ -11,19 +11,18 @@ mkDerivation {
|
|||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
async base bytestring clock containers managed pipes proto3-wire
|
||||
protobuf-wire safe sorted-list stm tasty tasty-hunit transformers
|
||||
async base bytestring clock containers managed pipes proto3-suite
|
||||
proto3-wire safe sorted-list stm tasty tasty-hunit transformers
|
||||
vector
|
||||
];
|
||||
librarySystemDepends = [ grpc ];
|
||||
libraryToolDepends = [ c2hs ];
|
||||
executableHaskellDepends = [
|
||||
async base bytestring containers optparse-generic proto3-wire
|
||||
protobuf-wire random system-filepath text transformers turtle
|
||||
vector
|
||||
async base bytestring containers optparse-generic proto3-suite
|
||||
proto3-wire random system-filepath text transformers turtle vector
|
||||
];
|
||||
testHaskellDepends = [
|
||||
async base bytestring clock containers managed pipes protobuf-wire
|
||||
async base bytestring clock containers managed pipes proto3-suite
|
||||
QuickCheck safe tasty tasty-hunit tasty-quickcheck text time
|
||||
transformers turtle unix
|
||||
];
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
-- | Generated by Haskell protocol buffer compiler. DO NOT EDIT!
|
||||
module Echo where
|
||||
import qualified Prelude as Hs
|
||||
import qualified Data.Protobuf.Wire.DotProto as HsProtobuf
|
||||
import qualified Data.Protobuf.Wire.Types as HsProtobuf
|
||||
import qualified Data.Protobuf.Wire.Class as HsProtobuf
|
||||
import qualified Proto3.Suite.DotProto as HsProtobuf
|
||||
import qualified Proto3.Suite.Types as HsProtobuf
|
||||
import qualified Proto3.Suite.Class as HsProtobuf
|
||||
import qualified Proto3.Wire as HsProtobuf
|
||||
import Control.Applicative ((<*>), (<|>))
|
||||
import qualified Data.Text as Hs (Text)
|
||||
|
|
|
@ -9,11 +9,11 @@ import Control.Concurrent.Async
|
|||
import Control.Monad
|
||||
import qualified Data.ByteString.Lazy as BL
|
||||
import Data.Function
|
||||
import Data.Protobuf.Wire.Class
|
||||
import qualified Data.Text as T
|
||||
import Data.Word
|
||||
import GHC.Generics (Generic)
|
||||
import Network.GRPC.LowLevel
|
||||
import Proto3.Suite.Class
|
||||
|
||||
helloSS, helloCS, helloBi :: MethodName
|
||||
helloSS = MethodName "/hellos.Hellos/HelloSS"
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
import Control.Monad
|
||||
import Data.Function (fix)
|
||||
import Data.Monoid
|
||||
import Data.Protobuf.Wire.Class
|
||||
import qualified Data.Text as T
|
||||
import Data.Word
|
||||
import GHC.Generics (Generic)
|
||||
import Network.GRPC.HighLevel.Server
|
||||
import qualified Network.GRPC.HighLevel.Server.Unregistered as U
|
||||
import Network.GRPC.LowLevel
|
||||
import Proto3.Suite.Class
|
||||
|
||||
serverMeta :: MetadataMap
|
||||
serverMeta = [("test_meta", "test_meta_value")]
|
||||
|
|
|
@ -31,8 +31,8 @@ library
|
|||
, managed >= 1.0.0 && < 1.1
|
||||
, pipes ==4.1.*
|
||||
, transformers
|
||||
, proto3-suite
|
||||
, proto3-wire
|
||||
, protobuf-wire
|
||||
|
||||
, async ==2.1.*
|
||||
, tasty >= 0.11 && <0.12
|
||||
|
@ -99,8 +99,8 @@ executable compile-proto-file
|
|||
, containers ==0.5.*
|
||||
, grpc-haskell
|
||||
, optparse-generic
|
||||
, proto3-suite
|
||||
, proto3-wire
|
||||
, protobuf-wire
|
||||
, system-filepath
|
||||
, text
|
||||
, transformers
|
||||
|
@ -118,8 +118,8 @@ executable hellos-server
|
|||
, bytestring == 0.10.*
|
||||
, containers ==0.5.*
|
||||
, grpc-haskell
|
||||
, proto3-suite
|
||||
, proto3-wire
|
||||
, protobuf-wire
|
||||
, text
|
||||
, transformers
|
||||
else
|
||||
|
@ -137,8 +137,8 @@ executable hellos-client
|
|||
, bytestring == 0.10.*
|
||||
, containers ==0.5.*
|
||||
, grpc-haskell
|
||||
, proto3-suite
|
||||
, proto3-wire
|
||||
, protobuf-wire
|
||||
, text
|
||||
, transformers
|
||||
else
|
||||
|
@ -157,8 +157,8 @@ executable echo-server
|
|||
, containers ==0.5.*
|
||||
, grpc-haskell
|
||||
, optparse-generic
|
||||
, proto3-suite
|
||||
, proto3-wire
|
||||
, protobuf-wire
|
||||
, text
|
||||
, vector
|
||||
other-modules:
|
||||
|
@ -179,8 +179,8 @@ executable echo-client
|
|||
, containers ==0.5.*
|
||||
, grpc-haskell
|
||||
, optparse-generic
|
||||
, proto3-suite
|
||||
, proto3-wire
|
||||
, protobuf-wire
|
||||
, text
|
||||
, random
|
||||
, vector
|
||||
|
@ -207,7 +207,7 @@ test-suite test
|
|||
, containers ==0.5.*
|
||||
, managed >= 1.0.0 && < 1.1
|
||||
, pipes ==4.1.*
|
||||
, protobuf-wire
|
||||
, proto3-suite
|
||||
, transformers
|
||||
, safe
|
||||
, clock >=0.6.0 && <0.8.0
|
||||
|
@ -236,7 +236,7 @@ benchmark bench
|
|||
, grpc-haskell
|
||||
, async ==2.1.*
|
||||
, criterion ==1.1.*
|
||||
, protobuf-wire
|
||||
, proto3-suite
|
||||
, bytestring ==0.10.*
|
||||
, random >=1.0.0
|
||||
hs-source-dirs: bench
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
, tasty-hunit, tasty-quickcheck, text, transformers, turtle, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "protobuf-wire";
|
||||
pname = "proto3-suite";
|
||||
version = "0.1.0.0";
|
||||
src = fetchgit {
|
||||
url = "git@github.mv.awakenetworks.net:awakenetworks/protobuf-wire.git";
|
||||
sha256 = "1d52hd7wq8cfxsp35mmamj0m3mr4705bc76344rhjmsi055r70bc";
|
||||
rev = "927c61bbb1002a9278b8a7cbe3968be059f9ff30";
|
||||
url = "https://github.com/awakenetworks/proto3-suite.git";
|
||||
sha256 = "0wvr54x3v6g9yb30nd5g9gfnn7j8is2hl8drwmmiyz0n45zlz0qh";
|
||||
rev = "827af4bf644d05e88b5d95dfe40febe7b43fab16";
|
||||
};
|
||||
libraryHaskellDepends = [
|
||||
base bytestring cereal containers deepseq filepath haskell-src mtl
|
||||
|
@ -21,5 +21,5 @@ mkDerivation {
|
|||
tasty-hunit tasty-quickcheck text transformers turtle
|
||||
];
|
||||
description = "A low level library for writing out data in the Protocol Buffers wire format";
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
}
|
|
@ -168,9 +168,9 @@ let
|
|||
proto3-wire =
|
||||
haskellPackagesNew.callPackage ./nix/proto3-wire.nix { };
|
||||
|
||||
protobuf-wire =
|
||||
proto3-suite =
|
||||
pkgs.haskell.lib.dontCheck
|
||||
(haskellPackagesNew.callPackage ./nix/protobuf-wire.nix {
|
||||
(haskellPackagesNew.callPackage ./nix/proto3-suite.nix {
|
||||
fetchgit = pkgs.fetchgitPrivate;
|
||||
});
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import Network.GRPC.LowLevel ( GRPCMethodType(..)
|
|||
import Network.GRPC.LowLevel.Op (WritesDone)
|
||||
import Network.GRPC.HighLevel.Server (convertRecv, convertSend)
|
||||
|
||||
import Data.Protobuf.Wire (Message, toLazyByteString, fromByteString)
|
||||
import Proto3.Suite (Message, toLazyByteString, fromByteString)
|
||||
import Proto3.Wire.Decode (ParseError)
|
||||
import Data.ByteString (ByteString)
|
||||
import qualified Data.ByteString.Lazy as BL
|
||||
|
|
|
@ -12,8 +12,8 @@ import qualified Control.Exception as CE
|
|||
import Control.Monad
|
||||
import Data.ByteString (ByteString)
|
||||
import qualified Data.ByteString.Lazy as BL
|
||||
import Data.Protobuf.Wire.Class
|
||||
import Network.GRPC.LowLevel
|
||||
import Proto3.Suite.Class
|
||||
import System.IO
|
||||
|
||||
type ServerCallMetadata = ServerCall ()
|
||||
|
|
|
@ -14,11 +14,11 @@ import Control.Concurrent.Async (async, wait)
|
|||
import qualified Control.Exception as CE
|
||||
import Control.Monad
|
||||
import Data.Foldable (find)
|
||||
import Data.Protobuf.Wire.Class
|
||||
import Network.GRPC.HighLevel.Server
|
||||
import Network.GRPC.LowLevel
|
||||
import qualified Network.GRPC.LowLevel.Call.Unregistered as U
|
||||
import qualified Network.GRPC.LowLevel.Server.Unregistered as U
|
||||
import Proto3.Suite.Class
|
||||
|
||||
dispatchLoop :: Server
|
||||
-> (String -> IO ())
|
||||
|
|
|
@ -6,7 +6,7 @@ import Test.Tasty
|
|||
import Test.Tasty.HUnit (testCase, (@?=))
|
||||
|
||||
import Data.String
|
||||
import Data.Protobuf.Wire.DotProto.Generate
|
||||
import Proto3.Suite.DotProto.Generate
|
||||
import qualified Data.Text as T
|
||||
|
||||
import Turtle
|
||||
|
|
|
@ -22,11 +22,12 @@ import Data.Foldable (sum)
|
|||
import Data.String
|
||||
import Data.Word
|
||||
import Data.Vector (fromList)
|
||||
import Data.Protobuf.Wire
|
||||
|
||||
import Network.GRPC.LowLevel
|
||||
import Network.GRPC.HighLevel.Client
|
||||
|
||||
import Proto3.Suite
|
||||
|
||||
import System.Random
|
||||
|
||||
import Test.Tasty
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
{-# LANGUAGE TypeOperators #-}
|
||||
|
||||
import Data.Monoid ((<>))
|
||||
import Data.Protobuf.Wire.DotProto.Generate
|
||||
import Filesystem.Path.CurrentOS (encodeString)
|
||||
import Options.Generic
|
||||
import Proto3.Suite.DotProto.Generate
|
||||
import Prelude hiding (FilePath)
|
||||
import Turtle (FilePath)
|
||||
|
||||
|
|
Loading…
Reference in a new issue