-
Notifications
You must be signed in to change notification settings - Fork 141
Proto Best Practices β references to googleapis/googleapis common objects #254
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
Comments
Thanks for submitting your question. Can you point me to an example of the common messages referenced in the Proto Best Practices topic? I'll work to get an answer to you--and potentially update the docs with it, as well--once I better understand the question. Thanks! |
@Logofile thanks for your prompt response. And of course, should have done so ahead of time, sorry. Here's the excerpt pointing to protocolbuffers.github.io/content/best-practices/dos-donts.md Lines 147 to 169 in 354da49
All of the links there point to googleapis/googleapis repository, with the excepiton of field_mask which is shipped with protobuf includes.
|
π€¦ I don't know why I didn't see that section when I reviewed it. I blame the fact that it was later I the day on a Friday. I'm not aware of the reason for the separation of the content, but since that's a code issue rather than a documentation issue, I recommend adding an issue in https://github.com/protocolbuffers/protobuf/issues. If you'd like to see a CI/CD best practice paragraph added to the documentation, let's leave this issue open to run alongside the code repository issue. |
@Logofile I know the feel and thank you very much for your guidance. I went ahead and created the issue in the |
It sounds like we're in agreement. π |
@Logofile Closing protocolbuffers/protobuf#21849 and punting this back to you as a documentation bug π. See my response there, it seems really unlikely we'd ever add new WKTs given the problems we've had with them |
Thanks! I'l work with @software-artificer in the other issues to get the docs updated. |
Oops. I got the issues mixed up. This one is the one to keep open. π€¦ Reopening.... |
Considering we got quite strong "bad vibes" for well-known and common types as the challenges that are associated with them, how do you think we should go about documenting this?
I am leaning towards just saying "use WKTs and get inspired by some of the designs from Google", but I am of course will follow the your guidance here @Logofile as a mainatiner. I have recently ran into an issue where I updated from proto3 to editions and this caused breaking changes in some generated code, despite not having any changes to the messages themselves, so even something like this could be a problem... |
I'm so glad to have your collaboration on this. I primarily see how Googlers use protobufs, so having an OSS perspective is really helpful. I prefer your second option for a couple of reasons:
Related to your recent experience with moving from proto3 to editions, I'm curious what breakage you ran into. Did you create an issue for it? We're working on tooling that will automate the transition from proto2/proto3 to editions to hopefully eliminate (or at least greatly reduce) any implementation-specific sharp corners. |
Thank you πββ and I appreciate your support on this. Let me clarify things a bit so we are definitely on the same page. When I am saying WKTs I specifically mean the well-known types that are shipped with the protobuf package. I believe that we both are in agreement that they should stay there and be used, recommended and documented. These include things like When I am talking about "Google's types" I specifically mean ones from When it comes to the breaking changes that I have recently observed in one of our projects it was when we flipped from proto3 to editions and got some generated code in Go changed from using concrete values to using pointers. |
Ah, thanks for that clarification! I didn't realize that we separate our Well-Known Types from other types that are provided by Google, but under a different package. So you're not asking about the WKT (which are available when you install protobuf), but rather asking that we document how to retrieve non-WKT Google types? If I'm still off, do please correct me. π I will check with the engineering team to find out what our recommendations are and update this topic with that information. |
You are spot on! Keep me posted on what you will learn from the eng team and thank you. |
I'm back from vacation! I'll try to work on this later this week. |
ππ» hey folks!
Not sure if this is an actual issue or just missing documentation, so feel free to point me out to the right place.
I am wondering how do people deal with "common" protobuf messages that are referenced in the "Proto Best Practices" document but are not shipped with the protoc compiler. I am talking about
google.types.*
specifically here, which are located in thegoogleapis/googleapis
. Feels a bit strange relying on someone's else API schemas.googleapis/api-common-protos
?Thanks in advance!
The text was updated successfully, but these errors were encountered: