Skip to content

Conversation

@miraleung
Copy link
Contributor

This will enable local development and building out the integration test framework on actual protos.

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 22, 2020
miraleung added a commit to googleapis/sdk-platform-java that referenced this pull request Sep 22, 2020
Copy link
Contributor

@vam-google vam-google left a comment

Choose a reason for hiding this comment

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

LGTM, with a few minor comments.

WORKSPACE Outdated
# Java
##############################################################################
# Java microgenerator.
_java_microgenerator_version = "3f098c4e21daa7b211cd43e6c4af03d627e754e4" # Will change often in dev.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't use variables in workspace file. This lets to save the one duplicate occurrence of this git hash, but it converts the workspace file from being declarative to being imperative. It is not a big deal here, but it opens a door for treating this WORKSPACE file as an "program", complicating this already very hard to parse file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

WORKSPACE Outdated
_java_microgenerator_version = "3f098c4e21daa7b211cd43e6c4af03d627e754e4" # Will change often in dev.

http_archive(
name = "com_google_api_generator",
Copy link
Contributor

Choose a reason for hiding this comment

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

I see you are following the same naming convention used in the monolith generator (the name of the bazel import corresponds to the name of the root java package of the generator). The other microgenerators simply use gapic_generator_<language> naming scheme, which has proven itself being less confusing to the users of this repo. Please consider using the same naming as the other microgenerators.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


# Java microgenerator.
# These will eventually replace the monolith Java rules.
rules["java_microgenerator_gapic_library"] = _switch(
Copy link
Contributor

Choose a reason for hiding this comment

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

We have been using the 2 suffix to distinguish between microgenerator and monolith while both are present in the imports (see python_gapic_library2) The idea was that microgenerator is an implementation detail, which is not important for the users of this repository. The only thing which matters is that it is some sort of a new version of the same rule, that is why it is called as java_gapic_library2.

Please consider using the same naming convention here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@miraleung
Copy link
Contributor Author

This will work when this PR is merged in and the hash here is updated.

@miraleung miraleung added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 26, 2020
@googleapis-publisher googleapis-publisher removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 26, 2020
@miraleung miraleung merged commit b7f574b into master Sep 26, 2020
@miraleung miraleung deleted the miraleung-patch-1 branch September 26, 2020 01:09
miraleung added a commit to googleapis/sdk-platform-java that referenced this pull request Sep 26, 2020
* fix: add new Bazel workflow to docs

This will work once [this PR](googleapis/googleapis#620) is in.

* fix: update steps
@jskeet
Copy link
Collaborator

jskeet commented Sep 30, 2020

Please note that the set of 6 commits here caused some confusing downstream autosynth changes. It would be best to rebase from the default branch and force push onto your branch before then rebasing back onto the default branch, so we only end up with the relevant commits in the history.

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