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

Add discogapic generator #90

Merged
merged 5 commits into from
Oct 12, 2018

Conversation

chingor13
Copy link
Contributor

Java Compute uses a discogapic generator (the a gapic generator that accepts discovery docs rather than protos). This adds a new generator that fetches the discovery-artifact-manager repo.

The java compute synth would end up like:

import synthtool as s
import synthtool.gcp as gcp

gapic = gcp.DiscoGAPICGenerator()
common_templates = gcp.CommonTemplates()

library = gapic.java_library(
    service='compute',
    version='v1',
    config_path='artman_compute.yaml',
    artman_output_name='')

s.copy(library / 'gapic-google-cloud-compute-v1/src', 'src')

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 5, 2018
@chingor13
Copy link
Contributor Author

I opted for a separate module rather than trying overload the other gapic generator. An alternative would be to add another option to _generate_code() for the repo to use. The downside is that it's another repo to sync in the setup.

Copy link
Contributor

@theacodes theacodes left a comment

Choose a reason for hiding this comment

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

I am a little concerned about the now duplicated code, especially the low-level stuff around invoking docker and figuring out the config file. Can you work with @busunkim96 to factor that out?

@chingor13
Copy link
Contributor Author

@theacodes @busunkim96 offered to do the refactor and should be able to push directly here.

@chingor13
Copy link
Contributor Author

chingor13 commented Oct 11, 2018

Looks like the git import was removed in the discogapic generator but is used to checkout the discovery artifact manager repo. (edit: fixed before I submitted my comment :))

@busunkim96 busunkim96 merged commit c89c309 into googleapis:master Oct 12, 2018
@chingor13 chingor13 deleted the discogapic_generator branch October 12, 2018 16:25
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.

4 participants