Skip to content

Remove gogo protobuf - #60

Merged
guillaumemichel merged 4 commits into
masterfrom
fix/deprecate-gogo
Jan 17, 2025
Merged

guillaumemichel merged 4 commits into
masterfrom
fix/deprecate-gogo

Conversation

@guillaumemichel

@guillaumemichel guillaumemichel commented Aug 7, 2024 •

Copy link
Copy Markdown
Member

Gogo protobuf is deprecated. Move away from it.

Also updated dependencies.

@guillaumemichel
guillaumemichel force-pushed the fix/deprecate-gogo branch 2 times, most recently from ca3fb23 to 8bc0539 Compare August 7, 2024 13:23

@vyzo vyzo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to consider downstream consumers who are probably still using gogo with the generated code, which are likely to break.

So if you want to kill gogo, you have to do it in the consumers as well, and this quickly becomes quite a large project in itself.

Note: I am not suggesting that we should keep gogo, by all means it is deprecated and we should move away from it, just pointing out that it is not trivial.

@guillaumemichel

Copy link
Copy Markdown
Member Author

Yes, I am moving go-libp2p-kad-dht away from gogo, and there is a dependency on go-libp2p-record. The plan is to make a new release of go-libp2p-record so that consumers can move away from gogo when they are ready.

Comment thread go.mod Resolved
Comment thread go.mod Resolved
Comment thread pb/record.pb.go Resolved
@sukunrt

sukunrt commented Jan 16, 2025

Copy link
Copy Markdown
Member

@vyzo

you need to consider downstream consumers who are probably still using gogo with the generated code, which are likely to break.

Why would downstream consumers be impacted? They just use the generated file, no?

@vyzo

vyzo commented Jan 16, 2025

Copy link
Copy Markdown

there might be some api changes.

@MarcoPolo

Copy link
Copy Markdown

The api changes are just that Marshal/Unmarshal are not methods on the generated structs, but instead functions that use reflect in the proto package. It's also missing the MarshalTo(SizedBuffer) method.

Should be a relatively straightforward change when upgrading.

@guillaumemichel
guillaumemichel merged commit f04da83 into master Jan 17, 2025
@guillaumemichel
guillaumemichel deleted the fix/deprecate-gogo branch January 17, 2025 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants