googleapis / rules_gapic

Apache License 2.0
8 stars 11 forks source link

Bazel template defaults to NPM @google-cloud namespace #58

Open jpoehnelt opened 3 years ago

jpoehnelt commented 3 years ago

The following is hardcoded into the mustache template.

package_name = "@google-cloud/{{name}}",
noahdietz commented 2 years ago

Hey @jpoehnelt so there are several different attributes that are hardcoded with some value that includes cloud. Is it just this one field you are concerned with? Or would you like to see all such hardcoded instances of cloud removed?

Alternatively, is the PA-related naming something you'd like to see be configurable e.g. via a flag? Or is plain ol'google /not cloud sufficient?

We've got a very simple heuristic for cloud-or-not that is not widely used in the generator. We could look to expand its use to more attributes, but we'd want to make sure we don't break anything else in the corpus (there are many APIs that might look like they aren't in cloud, but actually are e.g. Pub/Sub, Spanner, etc.).

Finally, depending on what is required here, we may have to punt this to our upcoming "build_gen v2" effort. We want to rewrite the BUILD file generator using buildozer to make it way smarter/more robust.

jpoehnelt commented 2 years ago

It is not limited to just this one.

Please note that the other solution we are assessing is just publishing everything under the cloud namespace (and letting Yoshi team do it for us). So feel free to adjust priority as you see fit.

noahdietz commented 2 years ago

In that case, I think it would be better to reclassify this as a feature request and ensure that it is considered for our v2 effort.