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

chore: Update steps to generate a library locally #1539

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

lqiu96
Copy link
Contributor

@lqiu96 lqiu96 commented Mar 22, 2023

Thank you for opening a Pull Request! For general contributing guidelines, please refer to contributing guide

Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #1499 ☕️

Ran into this issue when doing some testing for the release manager. This is what I did to resolve it locally.

@lqiu96 lqiu96 requested a review from a team as a code owner March 22, 2023 20:00
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Mar 22, 2023
@sonarqubecloud
Copy link

[gapic-generator-java-root] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarqubecloud
Copy link

[java_showcase_integration_tests] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@lqiu96 lqiu96 changed the title docs: Update steps to generate a library locally chore: Update steps to generate a library locally Mar 22, 2023
@sonarqubecloud
Copy link

[java_showcase_unit_tests] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@@ -109,16 +109,22 @@ To generate a production GAPIC API:
strip_prefix = "gapic-generator-java-%s" % _gapic_generator_java_version,
urls = ["https://github.com/googleapis/gapic-generator-java/archive/v%s.zip" % _gapic_generator_java_version],
)

# gax-java is part of gapic-generator-java repository
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this required? Tomo and I actually just discussed today, since gax is already included in the gapic-generator-java jar, as long as we built a new jar with local gax changes, we shouldn't need this step.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When I remove this reference to gax_java and point it to the generator_java instead, I get this error when invoking the command:

ERROR: /Users/lawrenceqiu/IdeaProjects/googleapis/google/cloud/talent/v4/BUILD.bazel:88:19: no such package '@com_google_api_gax_java//gax': The repository '@com_google_api_gax_java' could not be resolved: Repository '@com_google_api_gax_java' is not defined and referenced by '//google/cloud/talent/v4:talent_java_gapic_test'

Seems like there is reference to com_google_api_gax_java inside the java_gapic_library bazel rule?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see the problem now, yes there are gax references in java_gapic_library that is used for generating the gradle files. Now that gax repo is pointed to gapic-generator-java/gax-java, we have to point it to local folder otherwise it will complaint something about "SNAPSHOR version does not exist". Thanks for fixing it!
CC: @suztomo I know you might be working on improving this part, this is one more side effect of the gradle files generation.

@lqiu96 lqiu96 merged commit 0ed1359 into main Mar 28, 2023
@lqiu96 lqiu96 deleted the main-update_local_library_generation branch March 28, 2023 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to build googleapis library with local gapic-generator-java
2 participants