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

Clone behavior on maps is _marginally_ different than vanilla Proto.Clone() #16

Open
gunnar-solo opened this issue Dec 8, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@gunnar-solo
Copy link

When playing around with protoc-gen-ext v0.0.16 and using option (extproto.clone_all) = true;, I've noticed an inconsitency from the generated object.Clone() methods vs. the previously-used proto.Clone(object) method. Specifically:

The nested field of UpstreamSpec.Selector changed how it is cloned in the default case. Where previously no provided value --> clone would equate to nil, now a clone generates an empty map: map[string]string{}.

While not a breaking (or important) change at the moment, I'm documenting this, as there may be (as of now) unforeseen consequences to changing default map values on clone.

Further (potentially better-written) context by @sam-heilbron: solo-io/gloo#5658 (comment)

@gunnar-solo gunnar-solo added the bug Something isn't working label Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant