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: add synth rules #6

Merged
merged 6 commits into from
Feb 24, 2021
Merged

Conversation

vam-google
Copy link
Contributor

@vam-google vam-google commented Feb 9, 2021

The rules let running synth.py scripts from bazel build. Please check synth/README.md (part of this commit) for more details.

To run synth.py for Language API put the following in the BUILD.bazel file in the //google/cloud/language package:

load("@rules_gapic//synth:gapic_postprocessor.bzl", "java_synth_pkg")

java_synth_pkg(
    name = "java_language",
    synth_script = "synth.py",
    srcs = [
        "//google/cloud/language/v1:google-cloud-language-v1-java",
        "//google/cloud/language/v1beta2:google-cloud-language-v1beta2-java",
    ],
)

The synth.py script ran by the rule above is a regular synth.py script, some parts of which (like templates generation) will result in no-op if they are specific to code publishing and are not about postprocessing/correcting the code generated by the GAPIC generators.

The rules let running `synth.py` scripts from bazel build. Please check `synth/README.md` (part of this commit) for more details.
@vam-google vam-google requested a review from a team as a code owner February 9, 2021 07:38
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Feb 9, 2021
@vam-google vam-google changed the title feat: add synth rules [WIP] feat: add synth rules Feb 10, 2021
@vam-google vam-google changed the title [WIP] feat: add synth rules feat: add synth rules Feb 16, 2021
@alexander-fenster alexander-fenster merged commit 108ecc0 into googleapis:main Feb 24, 2021
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.

None yet

2 participants