Use custom protoc plugin for codegen #77
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-api-go#77
Loading…
Reference in a new issue
No description provided.
Delete branch "fyrchik/frostfs-api-go:update-marshaling"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
easyproto + easyjson = easy protoc plugin <3
It touches only
grpc/
packages, so all code on which SDK is dependent is untouched.TBD:
before/after this change)
Depends on #75, #76
I am not sure we need it here, maybe now is the time to move to a separate repo.
Here are results for
object.Unmarshal
(this will be transparently picked up by frostfs-node storage engine)c9f18aba0b
tofbba808d45
fbba808d45
tode3eb95dd3
de3eb95dd3
to3e23366c52
Added fuzz test autogeneration.
For now, just for unmarshal.
In future we may add
grpc/test/
package with native protoc codegen and check that our code and protoc code return equal errors (nil or non-nil) on any input.3e23366c52
to59d7bd7a59
59d7bd7a59
to2b11ab4974
2b11ab4974
toe990204c95
e990204c95
todcbbd4fdcd
dcbbd4fdcd
to7f903df1e1
7f903df1e1
to5bae7bf6a9
5bae7bf6a9
to03759317ef
WIP: use custom protoc plugin for codegento use custom protoc plugin for codegenuse custom protoc plugin for codegento Use custom protoc plugin for codegenfrostfs-cli + frostfs-node + frostfs-ir + frostfs-devenv works, caught a bug with tracing exporter.
03759317ef
to180f0bd106
180f0bd106
to6dc55b3fca
6dc55b3fca
to3a1a6c72f3
3a1a6c72f3
toc225e95c49
c225e95c49
to30bf64441d
30bf64441d
to84a552d150
84a552d150
to209f5ecace
209f5ecace
to4932274d34
@ -44,6 +44,7 @@ func TestRPCMessage(t *testing.T, msgGens ...func(empty bool) message.Message) {
if jm, ok := msg.(jsonMessage); ok {
t.Run(fmt.Sprintf("JSON_%T", msg), func(t *testing.T) {
data, err := jm.MarshalJSON()
fmt.Println(string(data))
Added for debugging?
yes, removed
@ -57,0 +60,4 @@
buf := make([]byte, 12)
buf = buf[:proto.Int32Marshal(201, buf, tc.input.FieldD)]
spew.Dump(buf)
spew.Dump(r)
Remove please.
Removed
4932274d34
tob1f18a1c69
b1f18a1c69
to6e8a0e09af
6e8a0e09af
to16920ed18d
16920ed18d
tod2622dbdae
d2622dbdae
tobf048fe8d4
@ -24,3 +21,4 @@
}
return m.FromGRPCMessage(gm)
// if err := proto.Unmarshal(data, gm); err != nil {
Looks like these lines no more needed.
fixed
@ -34,2 +33,2 @@
m.ToGRPCMessage().(proto.Message),
)
return json.Marshal(m.ToGRPCMessage())
// return protojson.MarshalOptions{
Looks like these lines no more needed.
fixed
@ -45,3 +48,3 @@
}
return m.FromGRPCMessage(gm)
// if err := protojson.Unmarshal(data, gm); err != nil {
Looks like these lines no more needed.
fixed
bf048fe8d4
tob6910f744d
Added JSON tests.
b6910f744d
tocc0199d82b
cc0199d82b
to8544f6dacf
8544f6dacf
to01be4470e6
01be4470e6
to038e475ba3
038e475ba3
to24b312c3c7
24b312c3c7
toa43110e363