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

feat: introduce snippet gen support #483

Merged
merged 41 commits into from
Oct 6, 2022
Merged

Conversation

dwsupplee
Copy link
Contributor

@dwsupplee dwsupplee commented May 27, 2022

No description provided.

@google-cla
Copy link

google-cla bot commented May 27, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@snippet-bot
Copy link

snippet-bot bot commented May 27, 2022

Here is the summary of changes.

You are about to add 317 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

Copy link
Contributor

@bshaffer bshaffer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preliminary pass with some minor suggestions

src/Ast/PhpFile.php Outdated Show resolved Hide resolved
src/Ast/PhpFile.php Show resolved Hide resolved
src/Generation/SnippetGenerator.php Outdated Show resolved Hide resolved
use Google\Cloud\Kms\V1\KeyManagementServiceClient;

/**
* Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This format is common in protos, but for PHP specifically we may be better off using @see tags, as I believe it's more idiomatic. Also the proto name (in this case google.cloud.kms.v1.CryptoKey) is not really relevant.

 * Returns metadata for a given {@see CryptoKey}, as

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/Generation/SnippetDetails.php Outdated Show resolved Hide resolved
src/Generation/SnippetGenerator.php Outdated Show resolved Hide resolved
src/Generation/SnippetGenerator.php Outdated Show resolved Hide resolved
src/CodeGenerator.php Outdated Show resolved Hide resolved
@dwsupplee dwsupplee added the cla: yes This human has signed the Contributor License Agreement. label Sep 26, 2022
@dwsupplee
Copy link
Contributor Author

/cc @amanda-tarafa PTAL :).

src/Generation/FieldDetails.php Outdated Show resolved Hide resolved
src/Generation/FieldDetails.php Show resolved Hide resolved
* has the following format: `projects/{project_id}/regions/{region}` * For
* `projects.locations.autoscalingPolicies.create`, the resource name of the
* location has the following format: `projects/{project_id}/locations/{location}`
* Please see {@see AutoscalingPolicyServiceClient::regionName()} for help
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

Copy link

@amanda-tarafa amanda-tarafa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from the point of view of SnippetGen Phase 1 output.

Thanks!!

Copy link

@amanda-tarafa amanda-tarafa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undoing LGTM, as I just thought to check for two issues that were recently surfaced on all other generators. It's worth it to ship PHP with them fixed.

Thanks!

Copy link
Collaborator

@noahdietz noahdietz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General LGTM

Copy link

@amanda-tarafa amanda-tarafa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants