Skip to content
This repository was archived by the owner on May 27, 2022. It is now read-only.

Commit fdae22c

Browse files
committed
remove gpb plugin and include generated files
--> Windows clients don't need to compile protobuf files, which was problematic
1 parent 06e052d commit fdae22c

File tree

6 files changed

+8272
-26
lines changed

6 files changed

+8272
-26
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ erl_crash.dump
1414
logs
1515
_build
1616
.idea
17-
*_pb.?rl
1817

Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
REBAR = rebar3
2+
3+
4+
all: compile
5+
6+
7+
8+
9+
compile:
10+
$(REBAR) compile
11+
12+
clean:
13+
rm -rf ebin/* test/*.beam logs log
14+
$(REBAR) clean
15+
16+
test:
17+
$(REBAR) eunit
18+
19+
dialyzer:
20+
$(REBAR) dialyzer
21+
22+
shell:
23+
$(REBAR) shell
24+
25+
26+
_build/gpb:
27+
mkdir -p _build/
28+
(cd _build/ && git clone https://github.com/tomas-abrahamsson/gpb && cd gpb && git checkout 4.1.8)
29+
30+
_build/gpb/bin/protoc-erl: _build/gpb
31+
(cd _build/gpb && make)
32+
33+
34+
35+
generate_pb: proto/antidote.proto _build/gpb/bin/protoc-erl
36+
_build/gpb/bin/protoc-erl -I. proto/antidote.proto -o-hrl include -o-erl src -modsuffix _pb -strbin
37+
cp _build/gpb/include/gpb.hrl include/

include/antidote_pb.hrl

Lines changed: 275 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,275 @@
1+
%% -*- coding: utf-8 -*-
2+
%% Automatically generated, do not edit
3+
%% Generated by gpb_compile version 4.1.8
4+
5+
-ifndef(antidote_pb).
6+
-define(antidote_pb, true).
7+
8+
-define(antidote_pb_gpb_version, "4.1.8").
9+
10+
-ifndef('APBERRORRESP_PB_H').
11+
-define('APBERRORRESP_PB_H', true).
12+
-record('ApbErrorResp',
13+
{errmsg, % = 1, bytes
14+
errcode % = 2, uint32
15+
}).
16+
-endif.
17+
18+
-ifndef('APBCOUNTERUPDATE_PB_H').
19+
-define('APBCOUNTERUPDATE_PB_H', true).
20+
-record('ApbCounterUpdate',
21+
{inc % = 1, sint64 (optional)
22+
}).
23+
-endif.
24+
25+
-ifndef('APBGETCOUNTERRESP_PB_H').
26+
-define('APBGETCOUNTERRESP_PB_H', true).
27+
-record('ApbGetCounterResp',
28+
{value % = 1, sint32
29+
}).
30+
-endif.
31+
32+
-ifndef('APBSETUPDATE_PB_H').
33+
-define('APBSETUPDATE_PB_H', true).
34+
-record('ApbSetUpdate',
35+
{optype, % = 1, {enum,'ApbSetUpdate.SetOpType'}
36+
adds = [], % = 2, [bytes]
37+
rems = [] % = 3, [bytes]
38+
}).
39+
-endif.
40+
41+
-ifndef('APBGETSETRESP_PB_H').
42+
-define('APBGETSETRESP_PB_H', true).
43+
-record('ApbGetSetResp',
44+
{value = [] % = 1, [bytes]
45+
}).
46+
-endif.
47+
48+
-ifndef('APBREGUPDATE_PB_H').
49+
-define('APBREGUPDATE_PB_H', true).
50+
-record('ApbRegUpdate',
51+
{value % = 1, bytes
52+
}).
53+
-endif.
54+
55+
-ifndef('APBGETREGRESP_PB_H').
56+
-define('APBGETREGRESP_PB_H', true).
57+
-record('ApbGetRegResp',
58+
{value % = 1, bytes
59+
}).
60+
-endif.
61+
62+
-ifndef('APBGETMVREGRESP_PB_H').
63+
-define('APBGETMVREGRESP_PB_H', true).
64+
-record('ApbGetMVRegResp',
65+
{values = [] % = 1, [bytes]
66+
}).
67+
-endif.
68+
69+
-ifndef('APBMAPKEY_PB_H').
70+
-define('APBMAPKEY_PB_H', true).
71+
-record('ApbMapKey',
72+
{key, % = 1, bytes
73+
type % = 2, {enum,'CRDT_type'}
74+
}).
75+
-endif.
76+
77+
-ifndef('APBMAPUPDATE_PB_H').
78+
-define('APBMAPUPDATE_PB_H', true).
79+
-record('ApbMapUpdate',
80+
{updates = [], % = 1, [{msg,'ApbMapNestedUpdate'}]
81+
removedKeys = [] % = 2, [{msg,'ApbMapKey'}]
82+
}).
83+
-endif.
84+
85+
-ifndef('APBMAPNESTEDUPDATE_PB_H').
86+
-define('APBMAPNESTEDUPDATE_PB_H', true).
87+
-record('ApbMapNestedUpdate',
88+
{key, % = 1, {msg,'ApbMapKey'}
89+
update % = 2, {msg,'ApbUpdateOperation'}
90+
}).
91+
-endif.
92+
93+
-ifndef('APBGETMAPRESP_PB_H').
94+
-define('APBGETMAPRESP_PB_H', true).
95+
-record('ApbGetMapResp',
96+
{entries = [] % = 1, [{msg,'ApbMapEntry'}]
97+
}).
98+
-endif.
99+
100+
-ifndef('APBMAPENTRY_PB_H').
101+
-define('APBMAPENTRY_PB_H', true).
102+
-record('ApbMapEntry',
103+
{key, % = 1, {msg,'ApbMapKey'}
104+
value % = 2, {msg,'ApbReadObjectResp'}
105+
}).
106+
-endif.
107+
108+
-ifndef('APBFLAGUPDATE_PB_H').
109+
-define('APBFLAGUPDATE_PB_H', true).
110+
-record('ApbFlagUpdate',
111+
{value % = 1, bool
112+
}).
113+
-endif.
114+
115+
-ifndef('APBGETFLAGRESP_PB_H').
116+
-define('APBGETFLAGRESP_PB_H', true).
117+
-record('ApbGetFlagResp',
118+
{value % = 1, bool
119+
}).
120+
-endif.
121+
122+
-ifndef('APBCRDTRESET_PB_H').
123+
-define('APBCRDTRESET_PB_H', true).
124+
-record('ApbCrdtReset',
125+
{
126+
}).
127+
-endif.
128+
129+
-ifndef('APBOPERATIONRESP_PB_H').
130+
-define('APBOPERATIONRESP_PB_H', true).
131+
-record('ApbOperationResp',
132+
{success, % = 1, bool
133+
errorcode % = 2, uint32 (optional)
134+
}).
135+
-endif.
136+
137+
-ifndef('APBTXNPROPERTIES_PB_H').
138+
-define('APBTXNPROPERTIES_PB_H', true).
139+
-record('ApbTxnProperties',
140+
{read_write, % = 1, uint32 (optional)
141+
red_blue % = 2, uint32 (optional)
142+
}).
143+
-endif.
144+
145+
-ifndef('APBBOUNDOBJECT_PB_H').
146+
-define('APBBOUNDOBJECT_PB_H', true).
147+
-record('ApbBoundObject',
148+
{key, % = 1, bytes
149+
type, % = 2, {enum,'CRDT_type'}
150+
bucket % = 3, bytes
151+
}).
152+
-endif.
153+
154+
-ifndef('APBREADOBJECTS_PB_H').
155+
-define('APBREADOBJECTS_PB_H', true).
156+
-record('ApbReadObjects',
157+
{boundobjects = [], % = 1, [{msg,'ApbBoundObject'}]
158+
transaction_descriptor % = 2, bytes
159+
}).
160+
-endif.
161+
162+
-ifndef('APBUPDATEOP_PB_H').
163+
-define('APBUPDATEOP_PB_H', true).
164+
-record('ApbUpdateOp',
165+
{boundobject, % = 1, {msg,'ApbBoundObject'}
166+
operation % = 2, {msg,'ApbUpdateOperation'}
167+
}).
168+
-endif.
169+
170+
-ifndef('APBUPDATEOPERATION_PB_H').
171+
-define('APBUPDATEOPERATION_PB_H', true).
172+
-record('ApbUpdateOperation',
173+
{counterop, % = 1, {msg,'ApbCounterUpdate'} (optional)
174+
setop, % = 2, {msg,'ApbSetUpdate'} (optional)
175+
regop, % = 3, {msg,'ApbRegUpdate'} (optional)
176+
mapop, % = 5, {msg,'ApbMapUpdate'} (optional)
177+
resetop, % = 6, {msg,'ApbCrdtReset'} (optional)
178+
flagop % = 7, {msg,'ApbFlagUpdate'} (optional)
179+
}).
180+
-endif.
181+
182+
-ifndef('APBUPDATEOBJECTS_PB_H').
183+
-define('APBUPDATEOBJECTS_PB_H', true).
184+
-record('ApbUpdateObjects',
185+
{updates = [], % = 1, [{msg,'ApbUpdateOp'}]
186+
transaction_descriptor % = 2, bytes
187+
}).
188+
-endif.
189+
190+
-ifndef('APBSTARTTRANSACTION_PB_H').
191+
-define('APBSTARTTRANSACTION_PB_H', true).
192+
-record('ApbStartTransaction',
193+
{timestamp, % = 1, bytes (optional)
194+
properties % = 2, {msg,'ApbTxnProperties'} (optional)
195+
}).
196+
-endif.
197+
198+
-ifndef('APBABORTTRANSACTION_PB_H').
199+
-define('APBABORTTRANSACTION_PB_H', true).
200+
-record('ApbAbortTransaction',
201+
{transaction_descriptor % = 1, bytes
202+
}).
203+
-endif.
204+
205+
-ifndef('APBCOMMITTRANSACTION_PB_H').
206+
-define('APBCOMMITTRANSACTION_PB_H', true).
207+
-record('ApbCommitTransaction',
208+
{transaction_descriptor % = 1, bytes
209+
}).
210+
-endif.
211+
212+
-ifndef('APBSTATICUPDATEOBJECTS_PB_H').
213+
-define('APBSTATICUPDATEOBJECTS_PB_H', true).
214+
-record('ApbStaticUpdateObjects',
215+
{transaction, % = 1, {msg,'ApbStartTransaction'}
216+
updates = [] % = 2, [{msg,'ApbUpdateOp'}]
217+
}).
218+
-endif.
219+
220+
-ifndef('APBSTATICREADOBJECTS_PB_H').
221+
-define('APBSTATICREADOBJECTS_PB_H', true).
222+
-record('ApbStaticReadObjects',
223+
{transaction, % = 1, {msg,'ApbStartTransaction'}
224+
objects = [] % = 2, [{msg,'ApbBoundObject'}]
225+
}).
226+
-endif.
227+
228+
-ifndef('APBSTARTTRANSACTIONRESP_PB_H').
229+
-define('APBSTARTTRANSACTIONRESP_PB_H', true).
230+
-record('ApbStartTransactionResp',
231+
{success, % = 1, bool
232+
transaction_descriptor, % = 2, bytes (optional)
233+
errorcode % = 3, uint32 (optional)
234+
}).
235+
-endif.
236+
237+
-ifndef('APBREADOBJECTRESP_PB_H').
238+
-define('APBREADOBJECTRESP_PB_H', true).
239+
-record('ApbReadObjectResp',
240+
{counter, % = 1, {msg,'ApbGetCounterResp'} (optional)
241+
set, % = 2, {msg,'ApbGetSetResp'} (optional)
242+
reg, % = 3, {msg,'ApbGetRegResp'} (optional)
243+
mvreg, % = 4, {msg,'ApbGetMVRegResp'} (optional)
244+
map, % = 6, {msg,'ApbGetMapResp'} (optional)
245+
flag % = 7, {msg,'ApbGetFlagResp'} (optional)
246+
}).
247+
-endif.
248+
249+
-ifndef('APBREADOBJECTSRESP_PB_H').
250+
-define('APBREADOBJECTSRESP_PB_H', true).
251+
-record('ApbReadObjectsResp',
252+
{success, % = 1, bool
253+
objects = [], % = 2, [{msg,'ApbReadObjectResp'}]
254+
errorcode % = 3, uint32 (optional)
255+
}).
256+
-endif.
257+
258+
-ifndef('APBCOMMITRESP_PB_H').
259+
-define('APBCOMMITRESP_PB_H', true).
260+
-record('ApbCommitResp',
261+
{success, % = 1, bool
262+
commit_time, % = 2, bytes (optional)
263+
errorcode % = 3, uint32 (optional)
264+
}).
265+
-endif.
266+
267+
-ifndef('APBSTATICREADOBJECTSRESP_PB_H').
268+
-define('APBSTATICREADOBJECTSRESP_PB_H', true).
269+
-record('ApbStaticReadObjectsResp',
270+
{objects, % = 1, {msg,'ApbReadObjectsResp'}
271+
committime % = 2, {msg,'ApbCommitResp'}
272+
}).
273+
-endif.
274+
275+
-endif.

0 commit comments

Comments
 (0)