websocket icon indicating copy to clipboard operation
websocket copied to clipboard

wspb.go uses deprecated protobuf package

Open iamcalledrob opened this issue 3 years ago • 1 comments

I love the idea of the protobuf helpers in wspb.go, but when trying to use them I noticed that wspb.go imports github.com/golang/protobuf/proto. Since this module is deprecated, this helper can't easily be used in a codebase using the newer protobuf library (google.golang.org/protobuf).

From https://github.com/golang/protobuf:

It has been superseded by the google.golang.org/protobuf module, which contains an updated and simplified API, support for protobuf reflection, and many other improvements. We recommend that new code use the google.golang.org/protobuf module.

It would be wonderful if this import could be switched out to use the newer module 😀

iamcalledrob avatar Aug 02 '21 17:08 iamcalledrob

Oh very nice! Will definitely do in the next major release as it would be a breaking change.

Though perhaps this also suggests protobuf helpers don't belong in the core package and should be published elsewhere?

nhooyr avatar Aug 06 '21 08:08 nhooyr

Yes, moving the helpers out e.g. into an example that can be copied or into a separate module would be good to avoid transitive dependencies.

ash2k avatar Jun 13 '23 04:06 ash2k

Done in dev.

nhooyr avatar Oct 13 '23 07:10 nhooyr

Is this a joke? Why wspb - a public package got removed?! Guys, you exposed this, people use it, it is NOT an internal package. Why you just brake everything in PATCH release??!! I even can not re-create the functionality of wspb as it uses internal package. Why you did that? Was it really a problem just to update the needed dependencies and let it live?

xornet-sl avatar Nov 12 '23 19:11 xornet-sl