feat: Add Java microgen rules to imports#620
Conversation
This will work once [this PR](googleapis/googleapis#620) is in.
vam-google
left a comment
There was a problem hiding this comment.
LGTM, with a few minor comments.
WORKSPACE
Outdated
| # Java | ||
| ############################################################################## | ||
| # Java microgenerator. | ||
| _java_microgenerator_version = "3f098c4e21daa7b211cd43e6c4af03d627e754e4" # Will change often in dev. |
There was a problem hiding this comment.
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.
WORKSPACE
Outdated
| _java_microgenerator_version = "3f098c4e21daa7b211cd43e6c4af03d627e754e4" # Will change often in dev. | ||
|
|
||
| http_archive( | ||
| name = "com_google_api_generator", |
There was a problem hiding this comment.
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.
repository_rules.bzl
Outdated
|
|
||
| # Java microgenerator. | ||
| # These will eventually replace the monolith Java rules. | ||
| rules["java_microgenerator_gapic_library"] = _switch( |
There was a problem hiding this comment.
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.
|
This will work when this PR is merged in and the hash here is updated. |
* fix: add new Bazel workflow to docs This will work once [this PR](googleapis/googleapis#620) is in. * fix: update steps
|
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. |
This will enable local development and building out the integration test framework on actual protos.