-
Notifications
You must be signed in to change notification settings - Fork 34
/
thrift-http.cabal
145 lines (131 loc) · 3.69 KB
/
thrift-http.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
cabal-version: 3.6
-- Copyright (c) Facebook, Inc. and its affiliates.
name: thrift-http
version: 0.1.0.0
synopsis: Support for Thrift-over-HTTP server and client
homepage: https://github.com/facebookincubator/hsthrift
bug-reports: https://github.com/facebookincubator/hsthrift/issues
license: BSD-3-Clause
license-file: LICENSE
author: Facebook, Inc.
maintainer: hsthrift-team@fb.com
copyright: (c) Facebook, All Rights Reserved
category: Thrift
description:
Support for building servers and clients that communicate
using Thrift over an HTTP transport. Uses WAI and Warp as
the server-side HTTP implementation, and http-client for
the client-side implementation.
.
NOTE: for build instructions and documentation, see
https://github.com/facebookincubator/hsthrift
source-repository head
type: git
location: https://github.com/facebookincubator/hsthrift.git
common fb-haskell
default-language: Haskell2010
default-extensions:
BangPatterns
BinaryLiterals
DataKinds
DeriveDataTypeable
DeriveGeneric
EmptyCase
ExistentialQuantification
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
LambdaCase
MultiParamTypeClasses
MultiWayIf
NoMonomorphismRestriction
OverloadedStrings
PatternSynonyms
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeFamilies
TypeSynonymInstances
NondecreasingIndentation
if flag(opt)
ghc-options: -O2
flag opt
default: False
library
import: fb-haskell
exposed-modules:
Thrift.Server.HTTP
Thrift.Channel.HTTP
build-depends:
fb-util,
thrift-lib,
base >=4.11.1 && <4.17,
text ^>=1.2.3.0,
bytestring >=0.10.8.2 && <0.12,
async ^>=2.2.1,
utf8-string,
containers,
wai,
warp,
streaming-commons,
network,
http-client,
http-types
default-language: Haskell2010
-- Workaround for IPv6 loopback bug on Docker/Ubuntu:
-- https://github.com/docker/for-linux/issues/1374
flag tests_use_ipv4
description: Force tests to use IPV4 whenever bringing thrift clients/servers up
default: False
manual: True
common test-deps
build-depends: aeson,
base,
bytestring,
data-default,
deepseq,
fb-stubs,
fb-util,
hashable,
hspec,
hspec-contrib,
ghc-prim,
HUnit ^>= 1.6.1,
STMonadTrans,
text,
thrift-lib,
thrift-lib:test-helpers,
transformers,
unordered-containers
if flag(tests_use_ipv4)
-- for test/Network.hs
cpp-options: -DIPV4
library test-lib
import: fb-haskell, test-deps
hs-source-dirs: test/common, test/gen-hs2
exposed-modules:
CalculatorHandler
EchoHandler
Echoer.Echoer.Client
Echoer.Echoer.Service
Echoer.Types
Math.Adder.Client
Math.Adder.Service
Math.Calculator.Client
Math.Calculator.Service
Math.Types
build-depends:
containers
common test-common
import: test-deps
hs-source-dirs: test
build-depends: thrift-http:test-lib, thrift-http
ghc-options: -threaded
test-suite server
import: fb-haskell, test-common
type: exitcode-stdio-1.0
main-is: ServerTest.hs
ghc-options: -main-is ServerTest