Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(protobuf): [Breaking] Use google.golang.org/protobuf #2053

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lrh3321
Copy link

@lrh3321 lrh3321 commented Mar 30, 2024

Problem

  1. github.com/golang/protobuf and https://github.com/gogo/protobuf were deprecated.
  2. XXX_DiscardUnknown, XXX_Marshal, XXX_Merge, XXX_Size, XXX_Unmarshal methods for structs in badgerpb4.pb.go are removed.

Solution

  1. Use google.golang.org/protobuf/cmd/protoc-gen-go to generate badgerpb4.pb.go
  2. Add Size, Marshal, MarshalTo, MarshalToSizedBuffer, Unmarshal methods to pb.KV, pb.DataKey, like protoc-gen-gogofaster does.
  3. Replace the imports

@lrh3321 lrh3321 requested a review from a team as a code owner March 30, 2024 15:28
@CLAassistant
Copy link

CLAassistant commented Mar 30, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

netlify bot commented Mar 30, 2024

Deploy Preview for badger-docs canceled.

Name Link
🔨 Latest commit 56a7f61
🔍 Latest deploy log https://app.netlify.com/sites/badger-docs/deploys/66082f888510dd000811d4f5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants