forked from facebookincubator/hsthrift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththrift-lib.cabal
240 lines (217 loc) · 6.15 KB
/
thrift-lib.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
cabal-version: 3.6
-- Copyright (c) Facebook, Inc. and its affiliates.
name: thrift-lib
version: 0.1.0.0
synopsis: Libraries for Haskell Thrift
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: [email protected]
copyright: (c) Facebook, All Rights Reserved
category: Thrift
build-type: Simple
extra-source-files: CHANGELOG.md,
if/*.thrift,
test/if/*.thrift
description:
Support for building client and server applications that
communicate using the Thrift protocols.
.
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
build-tool-depends: thrift-compiler:thrift-compiler
library
import: fb-haskell
exposed-modules:
Thrift.HasFields
Thrift.Monad
Thrift.CodegenTypesOnly
Thrift.Processor
Thrift.Api
Thrift.Codegen
Thrift.Channel
Thrift.Channel.SocketChannel
Thrift.Channel.SocketChannel.Server
Thrift.Protocol
Thrift.Protocol.Compact
Thrift.Protocol.Id
Thrift.Protocol.JSON
Thrift.Protocol.Binary
Thrift.Protocol.Binary.Internal
Thrift.Protocol.JSON.Base64
Thrift.Protocol.JSON.String
Thrift.Binary.Parser
Thrift.Protocol.ApplicationException.Types
Thrift.Protocol.RpcOptions.Types
Thrift.Util
hs-source-dirs: . gen-hs2
-- needed for fb-utils
extra-libraries: stdc++
build-depends:
ghc-prim,
dependent-sum >= 0.6 && <= 0.6.2.0,
-- TODO: Data.Some was split out into package some at 0.6.2.2,
-- deprecated 'This' was removed.
containers,
deepseq,
STMonadTrans,
data-default,
fb-util,
bytestring-lexing,
scientific,
ghc,
aeson >= 1,
word8,
aeson-pretty,
text-show,
base >=4.11.1 && <4.15,
async ^>= 2.2,
transformers ^>=0.5.5.0,
bytestring ^>=0.10.8.2,
network,
text ^>=1.2.3.0,
unordered-containers ^>=0.2.9.0,
hashable >=1.2.7.0 && <1.4,
vector ^>=0.12.0.1
if flag(tests_use_ipv4)
-- for SocketChannel.hs
cpp-options: -DIPV4
flag tests_use_ipv4
description: Force tests to use IPV4 whenever bringing thrift clients/servers up
default: False
manual: True
-- This will be used by other packages
library test-helpers
import: fb-haskell
visibility: public
hs-source-dirs: test/helpers
exposed-modules:
Network
TestChannel
if flag(tests_use_ipv4)
-- for test/Network.hs
cpp-options: -DIPV4
build-depends: base,
bytestring,
network,
thrift-lib,
common test-deps
if flag(tests_use_ipv4)
-- for test/Network.hs
cpp-options: -DIPV4
-- for test/cpp/MathServer.cpp
cxx-options: -DIPV4
build-depends: async ^>= 2.2,
base,
bytestring,
some,
fb-stubs,
fb-util,
filepath,
ghc-prim,
hspec,
hspec-contrib,
HUnit ^>= 1.6.1,
network,
text,
thrift-lib,
-- vvv for HsTest.Types
deepseq,
transformers,
aeson,
data-default,
unordered-containers,
hashable,
containers,
vector,
QuickCheck,
STMonadTrans,
thrift-lib:test-helpers,
-- This is used by local tests only
library test-lib
import: fb-haskell, test-deps
hs-source-dirs:
test/lib,
test/gen-hs2,
exposed-modules:
TestCommon
Math.Types
Math.Adder.Client
Math.Calculator.Client
Math.Adder.Service
Math.Calculator.Service
HsTest.Types
common test-common
import: test-deps
hs-source-dirs: test
build-depends:
thrift-lib:test-helpers,
thrift-lib:test-lib
test-suite channel
import: fb-haskell, test-common
type: exitcode-stdio-1.0
main-is: ChannelTest.hs
ghc-options: -main-is ChannelTest
test-suite socket-channel
import: fb-haskell, test-common
type: exitcode-stdio-1.0
main-is: SocketChannelTest.hs
ghc-options: -main-is SocketChannelTest
test-suite client
import: fb-haskell, test-common
type: exitcode-stdio-1.0
main-is: ClientTest.hs
ghc-options: -main-is ClientTest
test-suite binary-parser
import: fb-haskell, test-common
type: exitcode-stdio-1.0
main-is: BinaryParserTest.hs
ghc-options: -main-is BinaryParserTest
test-suite json-parsing
import: fb-haskell, test-common
type: exitcode-stdio-1.0
main-is: JSONStringTest.hs
ghc-options: -main-is JSONStringTest
test-suite json-num
import: fb-haskell, test-common
type: exitcode-stdio-1.0
main-is: JSONNumTest.hs
ghc-options: -main-is JSONNumTest
test-suite json-null
import: fb-haskell, test-common
type: exitcode-stdio-1.0
main-is: JSONNullTest.hs
ghc-options: -main-is JSONNullTest