Skip to content
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

Snippet Gen: Prevent namespace collisions with Google\Rpc\Status #538

Open
dwsupplee opened this issue Nov 21, 2022 · 0 comments
Open

Snippet Gen: Prevent namespace collisions with Google\Rpc\Status #538

dwsupplee opened this issue Nov 21, 2022 · 0 comments
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@dwsupplee
Copy link
Contributor

I have yet to find any cases where this happens, but it would be good to safeguard against.

LRO based samples import Google\Rpc\Status and reference it by relative name of Status. It is possible for this relative name to conflict with an import for a generated proto class, (ex. Google\Cloud\Service\Status). Options to address this can be to use an alias or the FQNS for samples where a conflict may arise.

Reference: https://github.com/googleapis/gapic-generator-php/blob/main/tests/Unit/ProtoTests/BasicLro/out/samples/BasicLroClient/method1.php#L59

@dwsupplee dwsupplee added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p3 Desirable enhancement or fix. May not be included in next release. labels Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

1 participant