fix: do not generate Version.java files by default#12955
fix: do not generate Version.java files by default#12955diegomarquezp wants to merge 15 commits intomainfrom
Conversation
…ities.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…ities.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Removed outdated regex for Version.java and adjusted deep-preserve-regex.
…gleapis/google-cloud-java into fix/version-java-owlbot-yaml
…gleapis/google-cloud-java into fix/version-java-owlbot-yaml
There was a problem hiding this comment.
Code Review
This pull request introduces a generate_version_java flag to control the generation of Version.java files, updating Bazel rules, the Java generator, and hermetic build scripts. It also adds several well-known type proto files for testing. The review feedback correctly identifies that the flag's default value should be changed to False to align with the objective of disabling generation by default and suggests using Collections.emptyList() for more idiomatic and efficient code.
| # possible values are: "grpc", "rest", "grpc+rest" | ||
| transport, | ||
| rest_numeric_enums, | ||
| generate_version_java = True, |
There was a problem hiding this comment.
The default value for generate_version_java is set to True, which contradicts the pull request title "do not generate Version.java files by default". To align with the intended goal of disabling generation by default, this should be set to False.
| generate_version_java = True, | |
| generate_version_java = False, |
| # possible values are: "grpc", "rest", "grpc+rest" | ||
| transport = None, | ||
| rest_numeric_enums = False, | ||
| generate_version_java = True, |
| service_yaml = None, | ||
| transport = None, | ||
| rest_numeric_enums = False, | ||
| generate_version_java = True, |
| fi | ||
|
|
||
| if [ -z "${generate_version_java}" ]; then | ||
| generate_version_java="true" |
There was a problem hiding this comment.
The default value for generate_version_java is set to "true", which contradicts the pull request title. It should be set to "false" to ensure that Version.java files are not generated by default in the hermetic build process.
| generate_version_java="true" | |
| generate_version_java="false" |
There was a problem hiding this comment.
This is for our open source library generation, which does require Version.java generation
|
|





This prevents self-service libraries from having these files.