WIP: [#40] types: Generate StableMarshaler methods for refs #41

Closed
aarifullin wants to merge 1 commit from aarifullin/frostfs-api-go:feature/40-autogen_marsh/refs_grpc into master
Member
  • Add plugin option for protogen in Makefile
  • Fix the generator for the plugin in util/protogen
  • Fix marshaler.go for refs

Signed-off-by: Airat Arifullin a.arifullin@yadro.com

* Add plugin option for protogen in Makefile * Fix the generator for the plugin in util/protogen * Fix marshaler.go for refs Signed-off-by: Airat Arifullin a.arifullin@yadro.com
aarifullin added the
enhancement
label 2023-06-12 22:37:43 +00:00
aarifullin added 1 commit 2023-06-12 22:37:45 +00:00
* Add plugin option for protogen in Makefile
* Fix the generator for the plugin in util/protogen
* Fix marshaler.go for refs

Signed-off-by: Airat Arifullin a.arifullin@yadro.com
aarifullin requested review from storage-core-committers 2023-06-12 22:37:53 +00:00
aarifullin requested review from storage-core-developers 2023-06-12 22:37:53 +00:00
aarifullin reviewed 2023-06-12 22:44:47 +00:00
@ -41,3 +33,1 @@
proto.BytesMarshal(ownerIDValField, buf, o.val)
return buf
return message.StableMarshal[*refs.OwnerID](o, buf)
Author
Member

@fyrchik , in this comment you said the marshaler should be replaced by the _frostfs.pb.go.

I'm afraid we cannot do like that because types in the refs/* (excpet for refs/grpc) are rpc-API specific and rather created by hand while _frostfs.pb.go is (obviosly) auto-generated. But I think I found the tradeoff using these invocations.

I would be glad to consider the good suggestion how we can deal with that

@fyrchik , in [this](https://git.frostfs.info/TrueCloudLab/frostfs-api-go/issues/40#issuecomment-12177) comment you said the marshaler should be replaced by the `_frostfs.pb.go`. I'm afraid we cannot do like that because types in the `refs/* (excpet for refs/grpc)` are `rpc`-API specific and rather created by hand while `_frostfs.pb.go` is (obviosly) auto-generated. But I think I found the tradeoff using these invocations. I would be glad to consider the good suggestion how we can deal with that
Owner

If we do it like this, these would be lots of unnecessary allocations.
I would rather remove intermediate wrappers, see https://github.com/nspcc-dev/neofs-api-go/issues/395 .

If we do it like this, these would be lots of unnecessary allocations. I would rather remove intermediate wrappers, see https://github.com/nspcc-dev/neofs-api-go/issues/395 .
Owner

This can complicate things on the SDK side, though.

This _can_ complicate things on the SDK side, though.
Owner
refs https://github.com/nspcc-dev/neofs-api-go/issues/395
aarifullin changed title from [#40] types: Generate StableMarshaler methods for refs to WIP: [#40] types: Generate StableMarshaler methods for refs 2023-06-19 09:57:18 +00:00
Owner

Postponed.

Postponed.
fyrchik closed this pull request 2023-08-23 19:00:05 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-committers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-api-go#41
No description provided.