Skip to content

types/known: functions for working with FieldMask #398

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

Closed
zombiezen opened this issue Jul 28, 2017 · 10 comments
Closed

types/known: functions for working with FieldMask #398

zombiezen opened this issue Jul 28, 2017 · 10 comments

Comments

@zombiezen
Copy link
Contributor

ptypes has convenience functions for most of the well-known types (WKT), except for FieldMask. This issue tracks adding functions to manipulate field masks.

@jgiles
Copy link

jgiles commented Sep 20, 2017

I'm not certain what precisely you include when you say "functions to manipulate field masks", but it would be nice to have the functionality available in Java for merging based on field masks available in Go:
https://github.com/google/protobuf/blob/master/java/util/src/main/java/com/google/protobuf/util/FieldMaskUtil.java

@zombiezen
Copy link
Contributor Author

Yup! That's what we're talking about. 😃

@zllak
Copy link

zllak commented Jan 16, 2018

Wouldn't it be possible to change the regen.sh script to build the field_mask.proto, without having the methods to manipulate it ?
It's a real pain in go to use the FieldMask, you'll have to get it from github.com/google/go-genproto/protobuf or google.golang.org/genproto/protobuf/field_mask

@nclinger
Copy link

Any update on this mr @zombiezen ?

@dsnet
Copy link
Member

dsnet commented Mar 30, 2018

We're in the process of making large-scale improvements to Go protobufs. For now, I think we should hold off on additional API for this. I recognize that this is a painpoint for some people, but there's nothing preventing someone from writing a 3rd-party package to wrap this behavior.

@dsnet
Copy link
Member

dsnet commented Aug 18, 2018

I should also note that field mask currently lives outside this repo: https://godoc.org/google.golang.org/genproto/protobuf/field_mask

We probably want to resolve #218 first.

@anand-mundada
Copy link

Any update on this? Do we have any recommended util/library method for Go?

@wkiser
Copy link

wkiser commented May 8, 2019

@anand-mundada it's not an official library, but I have successfully been using https://github.com/mennanov/fieldmask-utils until there is an official library.

@dsnet dsnet removed the enhancement label Jul 10, 2019
@dsnet dsnet added the post-v2 label Mar 3, 2020
@dsnet dsnet changed the title ptypes: functions for working with FieldMask types/known/fieldmaskpb: functions for working with FieldMask Mar 3, 2020
@dsnet dsnet changed the title types/known/fieldmaskpb: functions for working with FieldMask types/known: functions for working with FieldMask Mar 3, 2020
@dsnet
Copy link
Member

dsnet commented Jun 9, 2020

Fixed by https://golang.org/cl/225298. It will be available in the next release of the google.golang.org/protobuf module, to be released within a week or so.

@dsnet dsnet closed this as completed Jun 9, 2020
@dsnet dsnet removed the post-release label Jun 9, 2020
@dsnet
Copy link
Member

dsnet commented Jun 9, 2020

I should note that there isn't any functionality for using a FieldMask with merging or serialization to filter in/out fields in a message. That's to come in a future change as there is significant technical work that goes into it.

@golang golang locked as resolved and limited conversation to collaborators Jun 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants