diff --git a/bench/Bench.hs b/bench/Bench.hs index b7db680..56cae40 100644 --- a/bench/Bench.hs +++ b/bench/Bench.hs @@ -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 diff --git a/default.nix b/default.nix index 0878bbe..9415876 100644 --- a/default.nix +++ b/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 ]; diff --git a/examples/echo/echo-hs/Echo.hs b/examples/echo/echo-hs/Echo.hs index 486f201..bf34948 100644 --- a/examples/echo/echo-hs/Echo.hs +++ b/examples/echo/echo-hs/Echo.hs @@ -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) diff --git a/examples/hellos/hellos-client/Main.hs b/examples/hellos/hellos-client/Main.hs index 751d56a..ee65368 100644 --- a/examples/hellos/hellos-client/Main.hs +++ b/examples/hellos/hellos-client/Main.hs @@ -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" diff --git a/examples/hellos/hellos-server/Main.hs b/examples/hellos/hellos-server/Main.hs index 82601c9..1802b53 100644 --- a/examples/hellos/hellos-server/Main.hs +++ b/examples/hellos/hellos-server/Main.hs @@ -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")] diff --git a/grpc-haskell.cabal b/grpc-haskell.cabal index 5dc8485..0cc7406 100644 --- a/grpc-haskell.cabal +++ b/grpc-haskell.cabal @@ -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 diff --git a/nix/protobuf-wire.nix b/nix/proto3-suite.nix similarity index 74% rename from nix/protobuf-wire.nix rename to nix/proto3-suite.nix index b8fd2c0..374f789 100644 --- a/nix/protobuf-wire.nix +++ b/nix/proto3-suite.nix @@ -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; } diff --git a/release.nix b/release.nix index 1f670fc..d611042 100644 --- a/release.nix +++ b/release.nix @@ -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; }); diff --git a/src/Network/GRPC/HighLevel/Client.hs b/src/Network/GRPC/HighLevel/Client.hs index 8134858..fdd6085 100644 --- a/src/Network/GRPC/HighLevel/Client.hs +++ b/src/Network/GRPC/HighLevel/Client.hs @@ -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 diff --git a/src/Network/GRPC/HighLevel/Server.hs b/src/Network/GRPC/HighLevel/Server.hs index 8739df8..bcb96b4 100644 --- a/src/Network/GRPC/HighLevel/Server.hs +++ b/src/Network/GRPC/HighLevel/Server.hs @@ -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 () diff --git a/src/Network/GRPC/HighLevel/Server/Unregistered.hs b/src/Network/GRPC/HighLevel/Server/Unregistered.hs index ea91fbb..cd0e9f1 100644 --- a/src/Network/GRPC/HighLevel/Server/Unregistered.hs +++ b/src/Network/GRPC/HighLevel/Server/Unregistered.hs @@ -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 ()) diff --git a/tests/GeneratedTests.hs b/tests/GeneratedTests.hs index 98a297a..9b0d4c3 100644 --- a/tests/GeneratedTests.hs +++ b/tests/GeneratedTests.hs @@ -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 diff --git a/tests/TestClient.hs b/tests/TestClient.hs index d467c19..dfa7599 100644 --- a/tests/TestClient.hs +++ b/tests/TestClient.hs @@ -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 diff --git a/tools/compile-proto-file/Main.hs b/tools/compile-proto-file/Main.hs index 937c4d5..d973a0c 100644 --- a/tools/compile-proto-file/Main.hs +++ b/tools/compile-proto-file/Main.hs @@ -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)