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