You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 25, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 25, 2026. It is now read-only.
Generate common resource path helpers via google/cloud/common_resources.proto #586
I was visiting the Node chat and learned of the existence of the above file. Can we use it somehow to get more resource helpers methods into all the libraries? (the two with projects would be most useful I think)
This should be straightforward and easy. There are a couple of potential gotchas:
The path definitions in common_resources.proto don't have messages associated. This will require a little bit of rework in the generator logic and template.
The correct thing to do would be to have common_resources.proto imported and then to use the descriptors to generate paths. I don't think we can do that by the time the generator plugin runs, so we'll need to just hack it in.
There's a potential for name conflicts. One way to deal with this is to ignore it until a problem arises; another is to have a common disambiguation string, e.g. def common_project_path and def parse_common_project_path. Neither option seems great, but I'm leaning towards the second.
Activity
software-dov commentedon Sep 16, 2020
This should be straightforward and easy. There are a couple of potential gotchas:
common_resources.protodon't have messages associated. This will require a little bit of rework in the generator logic and template.common_resources.protoimported and then to use the descriptors to generate paths. I don't think we can do that by the time the generator plugin runs, so we'll need to just hack it in.def common_project_pathanddef parse_common_project_path. Neither option seems great, but I'm leaning towards the second.What do other people think? @vam-google @busunkim96