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

Add support for checking whether an existing field has moved into or out of a oneof #151

Merged
merged 3 commits into from
Dec 19, 2023

Conversation

pdecks
Copy link
Contributor

@pdecks pdecks commented Dec 18, 2023

Resolves #133 by adding a OneofParent field to a Field type.

Adds a rule checking whether a field has been moved into or out of a oneof, which is a backwards-incompatible change for Go protobuf stubs per https://google.aip.dev/180#moving-into-oneofs.

In addition to the passing unit tests, I've also tested this locally via our custom tooling & protolock plugins and verified it behaves as expected.

Copy link
Owner

@nilslice nilslice left a comment

Choose a reason for hiding this comment

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

excellent, thank you for this!

@nilslice nilslice merged commit 01572fa into nilslice:master Dec 19, 2023
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.

oneof structure is not persisted in protolock
2 participants