-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy paththrift-cpp-channel.cabal
201 lines (185 loc) · 5.93 KB
/
thrift-cpp-channel.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
cabal-version: 3.6
-- Copyright (c) Facebook, Inc. and its affiliates.
name: thrift-cpp-channel
version: 0.1.0.0
synopsis: Thrift channel implementation based on fbthrift
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: cpp/HsChannel.h,
if/gen-cpp2/*.h,
if/gen-cpp2/*.cpp,
if/gen-cpp2/*.tcc,
test/if/gen-cpp2/*.h,
test/if/gen-cpp2/*.cpp,
test/if/gen-cpp2/*.tcc
description:
Support for building client and server applications that
communicate using the Thrift protocols over channels
implemented in C++ with the fbthrift infrastructure.
.
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
common fb-cpp
cxx-options: -std=c++17
if !flag(clang)
cxx-options: -fcoroutines
if arch(x86_64)
cxx-options: -march=haswell
if flag(opt)
cxx-options: -O3
flag opt
default: False
flag clang
default: False
library
import: fb-haskell, fb-cpp
exposed-modules:
Thrift.Channel.Lib.CppChannel
Thrift.Channel.Lib.HeaderChannel
Thrift.Channel.HeaderChannel
cxx-sources:
cpp/HeaderChannel.cpp
cpp/HsChannel.cpp
if/gen-cpp2/RpcOptions_constants.cpp
if/gen-cpp2/RpcOptions_data.cpp
if/gen-cpp2/RpcOptions_metadata.cpp
if/gen-cpp2/RpcOptions_types.cpp
hs-source-dirs: .
build-tool-depends: hsc2hs:hsc2hs
hsc2hs-options: --cc=g++ --lflag=-lstdc++ --cflag=-D__HSC2HS__=1 --lflag=-lboost_context --lflag=-latomic --cflag=-std=c++17
include-dirs: .
pkgconfig-depends: fmt, openssl, libsodium, libzstd, zlib
extra-libraries:
thriftcpp2
thriftmetadata
thriftprotocol
-- Note that the order here matters, as thriftanyrep and thrifttyperep
-- depend on thrifttype.
thrifttyperep
thriftanyrep
thrifttype
transport
rpcmetadata
concurrency
thrift-core
async
wangle
fizz
stdc++
-- TODO: I needed this to satisfy an undefined reference to
-- jump_fcontext when running hsc2hs
boost_context
-- __atomic_is_lock_free (-latomic) missing with clang
atomic
build-depends:
base >=4.11.1 && <4.17,
thrift-lib,
fb-util,
text,
text-show,
bytestring
-- 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
flag include_broken_tests
description: Include broken tests
default: False
manual: True
test-suite header-channel
import: fb-haskell, fb-cpp
type: exitcode-stdio-1.0
hs-source-dirs: test, test/if/gen-hs2
main-is: HeaderChannelTest.hs
other-modules: Math.Adder.Client
Math.Calculator.Client
Math.Types
cxx-sources: test/MathServer.cpp
test/if/gen-cpp2/Calculator.cpp
test/if/gen-cpp2/AdderAsyncClient.cpp
test/if/gen-cpp2/Adder.cpp
test/if/gen-cpp2/math_types.cpp
test/if/gen-cpp2/math_data.cpp
test/if/gen-cpp2/math_metadata.cpp
extra-libraries:
thriftmetadata
thriftcpp2
thriftprotocol
transport
concurrency
thrift-core
if flag(tests_use_ipv4)
-- for test/Network.hs
cpp-options: -DIPV4
-- for test/cpp/MathServer.cpp
cxx-options: -DIPV4
ghc-options: -main-is HeaderChannelTest -threaded
build-depends:
base,
bytestring,
ghc-prim,
thrift-cpp-channel:thrift-cpp-channel,
fb-stubs,
thrift-lib:thrift-lib,
thrift-lib:test-helpers,
fb-util,
HUnit,
transformers,
data-default,
aeson,
hashable,
unordered-containers,
deepseq,
STMonadTrans
-- This test is broken when built from github. For some reason the
-- requests timeout. It seems to be a subtle timing issue of some
-- kind inside fbthrift, because I tried tracing through the code
-- using gdb and when using breakpoints the test will sometimes
-- pass. Without a deeper understanding of the internals of fbthrift
-- I can't get any further, so just ignoring the test for now. It
-- passes on the internal CI so I'm pretty sure it's not an issue
-- with the test itself.
if !flag(include_broken_tests)
buildable: False