2018-01-29 17:59:34 +01:00
|
|
|
name: grpc-haskell-core
|
2022-02-25 23:23:22 +01:00
|
|
|
version: 0.3.0
|
2018-01-29 17:59:34 +01:00
|
|
|
synopsis: Haskell implementation of gRPC layered on shared C library.
|
|
|
|
homepage: https://github.com/awakenetworks/gRPC-haskell
|
|
|
|
license: Apache-2.0
|
|
|
|
license-file: LICENSE
|
|
|
|
author: Awake Networks
|
|
|
|
maintainer: opensource@awakenetworks.com
|
|
|
|
copyright: Copyright 2016 Awake Networks
|
|
|
|
category: Network
|
|
|
|
build-type: Simple
|
|
|
|
cabal-version: >=1.10
|
2019-08-28 09:28:26 +02:00
|
|
|
extra-source-files: include/grpc_haskell.h
|
|
|
|
tests/ssl/localhost.crt
|
|
|
|
tests/ssl/localhost.key
|
2018-01-29 17:59:34 +01:00
|
|
|
|
|
|
|
Flag Debug
|
|
|
|
Description: Adds debug logging.
|
|
|
|
Manual: True
|
|
|
|
Default: False
|
|
|
|
|
|
|
|
library
|
|
|
|
build-depends:
|
|
|
|
base >=4.8 && <5.0
|
|
|
|
, clock >=0.6.0 && <0.8.0
|
|
|
|
, bytestring ==0.10.*
|
2019-03-26 00:52:04 +01:00
|
|
|
, stm >=2.4 && <2.6
|
|
|
|
, containers >=0.5 && <0.7
|
2018-01-29 17:59:34 +01:00
|
|
|
, managed >= 1.0.0 && < 1.1
|
|
|
|
, transformers
|
|
|
|
|
|
|
|
c-sources:
|
|
|
|
cbits/grpc_haskell.c
|
|
|
|
exposed-modules:
|
|
|
|
-- NOTE: the order of these matters to c2hs.
|
|
|
|
Network.GRPC.Unsafe.Constants
|
|
|
|
Network.GRPC.Unsafe.Time
|
|
|
|
Network.GRPC.Unsafe.Slice
|
|
|
|
Network.GRPC.Unsafe.ChannelArgs
|
|
|
|
Network.GRPC.Unsafe.ByteBuffer
|
|
|
|
Network.GRPC.Unsafe.Metadata
|
|
|
|
Network.GRPC.Unsafe.Op
|
|
|
|
Network.GRPC.Unsafe
|
|
|
|
Network.GRPC.Unsafe.Security
|
|
|
|
Network.GRPC.LowLevel
|
|
|
|
Network.GRPC.LowLevel.Server.Unregistered
|
|
|
|
Network.GRPC.LowLevel.Client.Unregistered
|
|
|
|
Network.GRPC.LowLevel.CompletionQueue
|
|
|
|
Network.GRPC.LowLevel.CompletionQueue.Internal
|
|
|
|
Network.GRPC.LowLevel.CompletionQueue.Unregistered
|
|
|
|
Network.GRPC.LowLevel.GRPC
|
grpc-haskell{-core} -> 0.2.0: Fix MetadataMap duplicate-key ordering (#132)
* Put LD_LIBRARY_PATH set back into Linux `nix-shell`
...as we need it for `ghci` workflows inside the shell(s).
* Add (failing) test case to check MetadataMap ordering
* Remove SortedList value-component from MetadataMap
...which fixes the failing test case introduced by `85a2d13`.
This is a potentially breaking change that warrants a library rev bump.
I'm not sure what the original reason was for the sorted list component of
`MetadataMap` (i.e., header values), but that implementation choice makes it so
that determining the "last provided" header value associated with a duplicate
key cannot be recovered. That is, it is in violation of this requirement from
the [spec](https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md):
```
Custom-Metadata header order is not guaranteed to be preserved except for values
with duplicate header names.
```
I'm guessing that the original motivation might have been to ensure that the Eq
instance was not sensitive to ordering of values for duplicate keys.
I think we can drop the existing `Eq` assumption about order-insensitive values
for duplicate keys (there is order sensitivity after all), and if we end up
discovering a common use case for an order-insensitive equality on values, we
should address that via a utility function (instead via the type's `Eq`
instance).
So, this commit changes the value component of the `MetadataMap` type to be a
list of `ByteString` values instead of `SortedList ByteString`, and removes the
`sorted-list` package as a dependency, as it has no other uses in the library.
Note that this commit is not claiming we are now spec-compliant w.r.t. header
treatment after this change. In particular (and at least),
1. We do not yet support base64-encoded binary data via the special `-bin` key
suffix.
2. As far as I am aware, we do not (yet) interpret comma-separated header values
the same as duplicate header keys for each of those values.
3. As far as I am aware, we do not (yet) do any validation of header names nor
whitespace handling as per the request grammar from the spec.
* Extend Arbitrary MetadataMap to explicitly encode key duplication
Duplicate keys were allowed by the previous implementation, but this commit
makes key duplication more explicit and more frequent.
* Add metadata map ordering QC prop
* Drop qualified use of @?= since it's so common in this module
* Extend checkMetadataOrdering to check instance Eq MetadataMap
...and use the appropriate bracketing wrapper.
* Relocate MetadataMap type to its own module
* Add some helper functions for MetadataMap lookup; documentation
* Extend testMetadataOrdering w/ use of lookup{All,Last}
* Bump grpc-haskell{,-core} -> 0.2.0
2021-07-01 03:32:33 +02:00
|
|
|
Network.GRPC.LowLevel.GRPC.MetadataMap
|
2018-01-29 17:59:34 +01:00
|
|
|
Network.GRPC.LowLevel.Op
|
|
|
|
Network.GRPC.LowLevel.Server
|
|
|
|
Network.GRPC.LowLevel.Call
|
|
|
|
Network.GRPC.LowLevel.Call.Unregistered
|
|
|
|
Network.GRPC.LowLevel.Client
|
|
|
|
extra-libraries:
|
2019-08-22 18:12:21 +02:00
|
|
|
grpc
|
|
|
|
, gpr
|
2018-01-29 17:59:34 +01:00
|
|
|
includes:
|
|
|
|
include/grpc_haskell.h
|
|
|
|
, grpc/grpc.h
|
|
|
|
, grpc/status.h
|
|
|
|
, grpc/support/time.h
|
|
|
|
, grpc/impl/codegen/compression_types.h
|
|
|
|
, grpc/slice_buffer.h
|
|
|
|
, grpc/slice.h
|
|
|
|
build-tools: c2hs
|
|
|
|
default-language: Haskell2010
|
2021-06-30 19:31:45 +02:00
|
|
|
ghc-options: -Wall -Werror -fwarn-incomplete-patterns -fno-warn-unused-do-bind
|
2018-01-29 17:59:34 +01:00
|
|
|
include-dirs: include
|
|
|
|
hs-source-dirs: src
|
|
|
|
default-extensions: CPP
|
|
|
|
CC-Options: -std=c99
|
|
|
|
if flag(debug)
|
|
|
|
CPP-Options: -DDEBUG
|
|
|
|
CC-Options: -DGRPC_HASKELL_DEBUG -std=c99
|
|
|
|
|
|
|
|
test-suite tests
|
|
|
|
build-depends:
|
|
|
|
base >=4.8 && <5.0
|
|
|
|
, grpc-haskell-core
|
|
|
|
, bytestring ==0.10.*
|
|
|
|
, unix
|
|
|
|
, time
|
2019-03-26 00:52:04 +01:00
|
|
|
, async >=2.1 && <2.3
|
|
|
|
, tasty >= 0.11
|
|
|
|
, tasty-hunit >= 0.9
|
|
|
|
, tasty-quickcheck >= 0.8.4
|
|
|
|
, containers >=0.5 && <0.7
|
2018-01-29 17:59:34 +01:00
|
|
|
, managed >= 1.0.0 && < 1.1
|
|
|
|
, pipes >=4.1 && <=4.4
|
|
|
|
, proto3-suite
|
|
|
|
, transformers
|
|
|
|
, safe
|
|
|
|
, clock >=0.6.0 && <0.8.0
|
|
|
|
, turtle >= 1.2.0
|
|
|
|
, text
|
|
|
|
, QuickCheck >=2.8 && <3.0
|
|
|
|
other-modules:
|
|
|
|
LowLevelTests,
|
|
|
|
LowLevelTests.Op,
|
|
|
|
UnsafeTests
|
|
|
|
default-language: Haskell2010
|
2021-06-30 19:31:45 +02:00
|
|
|
ghc-options: -Wall -Werror -fwarn-incomplete-patterns -fno-warn-unused-do-bind -g -threaded -rtsopts
|
2018-01-29 17:59:34 +01:00
|
|
|
hs-source-dirs: tests
|
|
|
|
main-is: Properties.hs
|
|
|
|
type: exitcode-stdio-1.0
|
|
|
|
default-extensions: CPP
|
|
|
|
if flag(debug)
|
|
|
|
CPP-Options: -DDEBUG
|
|
|
|
CC-Options: -DGRPC_HASKELL_DEBUG
|