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

Removal of “weak field” support (protolegacy feature) #1666

Closed
stapelberg opened this issue Jan 9, 2025 · 0 comments
Closed

Removal of “weak field” support (protolegacy feature) #1666

stapelberg opened this issue Jan 9, 2025 · 0 comments

Comments

@stapelberg
Copy link

Weak fields were the predecessor to extensions (many many years ago) and were entirely removed from Google’s production usage by now. (The corresponding field in descriptor.proto was always documented as “// For Google-internal migration only. Do not use.”)

Go Protobuf still contains support for weak fields behind the protolegacy build tag.

The protolegacy build tag was always documented as not being part of the compatibility agreement:

// WARNING: The compatibility agreement covers nothing provided by this flag.
// As such, functionality may suddenly be removed or changed at our discretion.
const ProtoLegacy = protoLegacy

We aim to remove support for weak fields from Go Protobuf. This issue is a heads-up for said removal.

gopherbot pushed a commit to protocolbuffers/protobuf-go that referenced this issue Jan 9, 2025
This is a no-op change in preparation of removing support for weak fields.
It allows users to keep enabling ProtoLegacy in general,
but also disable weak field support independently.

For golang/protobuf#1666

Change-Id: Ic3cb90d937e21a817ddbbb36029274be8b5f2513
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/641635
Reviewed-by: Chressie Himpel <chressie@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
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

No branches or pull requests

1 participant