Closed thagomizer closed 5 years ago
They are two different namespaces. One with "i", the other with "I".
This root issue of the namespaces was discussed in #1750, leading to googleapis/artman#288.
@geigerj Should we close this? Or assign it to you?
The latest docs for the gem at rubydoc.info still show the two namespaces.
Sure, you can assign to me. This is basically pending the implementation of https://github.com/googleapis/artman/issues/288.
Recap of this issue:
Google::Cloud::VideoIntelligence
and Google::Cloud::Videointelligence
-- differing on the casing of the i
in intelligence
), which should probably be merged.Google::Cloud::VideoIntelligence
, whereas protoc-generated code is in Google::Cloud::Videointelligence
artman
modifies the protoc
output (see here), and toolkit exports the protoc-generated types into a predictable namespace (example here)For Ruby, I do not recommend the proto option approach on the basis of PHP's recent experience implenting their proto extension. This is a heavyweight solution that requires substantial cost both to modify protoc and to manage a backfill of existing protos without breaking internal usage. I would probably recommend following a solution similar to Python's, which is what is tracked by googleapis/artman#288. @lukesneeringer and @michaelbausor are good folks to chat to for context on these two different approaches.
@jbolinger Is there any hope for resolution of this issue? It is now out of SLO.
@quartzmo there's some good news here. I requested a ruby_package
protoc option awhile back and it was implemented (details on googleapis/artman#288). However, I'm not sure if it has been released and we haven't tried to use it yet (the docs don't mention the new option yet either).
We could ask for the protos to be updated to use the option, which should result in a single namespace. It will clearly be a breaking change. Do you know who to ping about doing that?
@jbolinger Congratulations on the progress with artman! Regarding the breaking change, the package is 1.0.0
. I don't know who to ask about it.
Perhaps identifying an internal owner is something @JustinBeckwith can help with. The code was first added by @swcloud in #1490.
A breaking change would require the library to go to 2.0, but I don't see that as being a problem.
Could we possibly make the old (bad) namespace an alias for the new, fixed namespace? We'd also need to exclude the old namespace from docs.
but I don't see that as being a problem.
This is actually a problem.
Could we possibly make the old (bad) namespace an alias for the new, fixed namespace?
We proposed this when the issue first came up, but were told that because this gem is 100% generated any changes would need to come from the generated code. This is why the issue has remained open for so long that it is out of SLO.
This is actually a problem.
Why is this a problem? The gem version doesn't track the API version. Why not release a 2.0 gem?
That's silly. The whole point of our approach to client libraries is that we can make modifications. If you'll send a PR to add the alias, I'll codify it into a synthesis script for this package. We're experimenting with synthesis scripts in other languages specifically for reasons such as this.
Why is this a problem? The gem version doesn't track the API version. Why not release a 2.0 gem?
Because ostensibly we have to support every major version for at least a year.
So you are proposing the following:
1) Generate new ruby files from the protos that use the new Google::Cloud::VideoIntelligence
namespace instead of Google::Cloud::Videointelligence
.
2) I'll add a pr that aliases Google::Cloud::VideoIntelligence
as Google::Cloud::Videointelligence
to maintain backwards compatibility.
3) You'll update the generator to incorporate the alias changes.
4) We generate new ruby files that include the alias changes.
Is that correct?
Basically. Except we won't actually merge #1 or #2, I'll incorporate those into a single script and do a full regeneration using that.
@jbolinger Can you open a PR that updates these files using the new namespace? I'll add the alias to maintain backwards compatibility to your PR.
@blowmage Sure, but we have to wait for the 3.6.0 protobuf release to land so we can use the new flag (shouldn't be long).
We've also merged the changes for credentials.rb
that we discussed a few weeks ago into the generator so this might be a good time to develop a similar script to retain compatibility for it.
@theacodes who should make the proto changes? Can we just do it or should we request it be done by the backend team?
@jbolinger is it just to change the protobuf package name for ruby? We can send a CL.
@theacodes Great - thanks for confirming. Yes, it's just a one line option like most of the other languages already have.
We've also merged the changes for
credentials.rb
that we discussed a few weeks ago into the generator so this might be a good time to develop a similar script to retain compatibility for it.
Absolutely, I'll also make those changes that maintain backwards compatibility in your PR.
@jbolinger Is this something we can start doing now?
@blowmage yup, we'll need to update the protos to get started. Either @dazuma or I can do that part pretty easily. Do we want to do this for all 4 versions of the API (I suspect yes)?
I'd actually prefer to wait until after next week to get started on this, as we're going to need to coordinate some synth script changes to alias the old names, and I'm slammed for the next week due to ElixirConf. Unless someone else would like to tackle the synth script changes?
It has been a few weeks. Are we ready to start on this? If not, when do we expect we can make this change?
We are looking into setting ruby_namespace
in the protobuf files to resolve this.
We have requested ruby_namespace
to be set in the proto files, but haven't seen the change made yet. We hope this will happen in the next couple weeks.
@blowmage and @dazuma, is this fixed by #3582?
Yes, closing.
It should only be listed once.